Generally speaking I understand that when a file is opened by Compare By Content, it cannot be modified, though I am unsure if this is the intended design.
Given how it works currently, I have encountered the following error.
If a file needs to be extracted (e.g. from .zip) to %Temp% folder of the user, when trying to do another Compare By Content where the same file name needs to be extracted, the operation will be "silently" blocked.
Technically speaking a Windows notification sound is still being played, but no visual representation of the failed operation occurs.
The origin of the issue seems to be that the same file names are extracted to the same fixed path, which can have a lock on it at the time when the extraction happens.
This is just one of the many ways to simply reproduce the error:
1. Create a file called test.txt and store it 1.zip and 2.zip.
2. This approach will require you to modify the content of the uncompressed test.txt file to ensure you will have different data to compare as the Compare By Content window must be opened.
3. Get inside 1.zip and compare the test.txt file from it with the non-compressed test.txt file and keep the Compare By Content window open.
4. Do the same for 2.zip: Compare test.txt from it with the uncompressed file.
RESULT: Windows error notification sound is played, but no visual representation of the error will happen.
Normally, when you have the file locked in such a way and you try to save over it, you will get the following error pop-up on OS level: "This proccess cannot access the file because it is being used by another process."
The error you are receiving varies given on what program you are using.
Something like this would be nice to have instead of the "silent" failure.
[TC 11.03] Compare By Content silently fails if the temporary extraction path is already locked
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [TC 11.03] Compare By Content silently fails if the temporary extraction path is already locked
There is indeed no error when the file is mapped into memory, so overwriting isn't possible.
You could set a larger value via wincmd.ini option MaxCompareSizeInMem, then TC will overwrite the file and compare it. But this will cause problems editing the first file.
You could set a larger value via wincmd.ini option MaxCompareSizeInMem, then TC will overwrite the file and compare it. But this will cause problems editing the first file.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [TC 11.03] Compare By Content silently fails if the temporary extraction path is already locked
Thank you for the response.
I am not sure how to use this parameter exactly, I tried giving it a random integer value (larger than the file size) but nothing seems to have changed in behavior.
Basically how it currently works is fine from my point of view, it was more about receiving some sort of (a telling) display message when the user selects "yes" after being prompted for overwriting the already existing path in the TEMP folder, instead of a silent error.
If sound is disabled/muted or set to nothing for that particular audio notification, there no indication whatsoever why nothing has happened despite the user selected to proceed by clicking on "yes" in the confirmation dialog.
I am not sure how to use this parameter exactly, I tried giving it a random integer value (larger than the file size) but nothing seems to have changed in behavior.
Basically how it currently works is fine from my point of view, it was more about receiving some sort of (a telling) display message when the user selects "yes" after being prompted for overwriting the already existing path in the TEMP folder, instead of a silent error.
If sound is disabled/muted or set to nothing for that particular audio notification, there no indication whatsoever why nothing has happened despite the user selected to proceed by clicking on "yes" in the confirmation dialog.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [TC 11.03] Compare By Content silently fails if the temporary extraction path is already locked
This should be fixed in Total Commander 11.50 beta 1, please check it!
12.04.24 Fixed: Compare by content with file in archive (in main program and in Synchronize Dirs): Show error message when unpacking fails, e.g. because target exists in TEMP and is locked (32/64)
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [TC 11.03] Compare By Content silently fails if the temporary extraction path is already locked
Thank you so much, it certainly provides a better user experience now!
If the path is too long, however, it will be trimmed and could raise some confusion therefore.
It may be useful to display the full path to be more explicit.
Furthermore, the error message of "Error writing <filepath>" could be a bit more telling.
It does not explicitly state why there is a write error.
I would recommend adding more text, such as "Error writing <filepath>. The file already exists and is opened for write access by another process."
The phrasing can be adjusted as deemed best, but also keeping it easy-to-understand for the less experienced users.
It could be also useful for professionals, who just happened to forgot that there is a window in the background that has a lock on this file.
If the path is too long, however, it will be trimmed and could raise some confusion therefore.
It may be useful to display the full path to be more explicit.
Furthermore, the error message of "Error writing <filepath>" could be a bit more telling.
It does not explicitly state why there is a write error.
I would recommend adding more text, such as "Error writing <filepath>. The file already exists and is opened for write access by another process."
The phrasing can be adjusted as deemed best, but also keeping it easy-to-understand for the less experienced users.
It could be also useful for professionals, who just happened to forgot that there is a window in the background that has a lock on this file.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [TC 11.03] Compare By Content silently fails if the temporary extraction path is already locked
Thanks for confirming the fix! I will consider your suggestions for a future version.
Moderator message
Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com