When conflicts are checked
A conflict check runs every time you:- Add files using the Agregar toolbar button (files or folder).
- Drag and drop files or folders onto the content panel.
How it works
When you browse a folder (viaGET /api/browse), the server scans the entire WIM image using 7-Zip and builds a flat list of all paths. These paths are stored in a Set (lowercase) for O(1) lookup:
The conflict index is rebuilt each time you browse a folder. If you add files externally or the WIM changes outside of WimExplorer, browse again to refresh the index before importing.
POST /api/check-conflicts. The server checks each proposed destination path against wimPathsLower and returns two lists:
- New files — paths that do not yet exist in the WIM.
- Replacements — paths that already exist and would be overwritten.
The conflict modal
If any conflicts are found, the Conflictos detectados modal appears before the upload begins. It shows two columns:| Column | Contents |
|---|---|
| Nuevos | Files that will be added as new entries |
| Reemplazos | Files that already exist and will be replaced |
- Click Importar todo to proceed. Conflicting files are deleted first, then all files (new and replacements) are added in a single
wimlib-imagex updatebatch. - Click Cancelar to abort the import entirely. No changes are made to the WIM.
Server-side revalidation
Even after the client-side conflict check, the server revalidates conflicts independently whenPOST /api/batch-import is called. The server checks each destination path against the same wimPathsLower set before issuing any write commands. This prevents race conditions where the index might have changed between the check and the actual write.
Example scenario
You drag 5 files from Windows Explorer onto the content panel:boot.ini— already exists in the WIM at\boot.inintldr— already exists in the WIM at\ntldrconfig.sys,autoexec.bat,readme.txt— do not exist in the WIM
- Nuevos (3):
config.sys,autoexec.bat,readme.txt - Reemplazos (2):
boot.ini,ntldr
delete commands for boot.ini and ntldr, then add commands for all 5 files in a single update pass.