TC7.50a deletes files when source cannot be read

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Husted
New Member
New Member
Posts: 1
Joined: 2009-10-07, 13:38 UTC

TC7.50a deletes files when source cannot be read

Post by *Husted »

Hi.
I have an issue when trying to copy a file that is locked to a directory where a copy of the file already exist. On my system the file in the target directory is deleted.

In my case the source file is a PST file that is open in MS Outlook. The target directory already have a file of the same name as the source PST file. If I try to copy TC will ask if I want to overwrite the file in the target directory.
After I confirm that the target file should be overwritten TC shows an error that the source file cannot be read and nothing is copied. At this point the file in the target directory has been deleted.

In the Copy dialog under Advanced Options there's a checkbox labeled "Skip all which cannot be opened for reading" but it doesn't have any effect, the file in target directory is still deleted.

I can see why this happens but is this really expected behavior? I would expect TC to check that the source file can be read before deleting the file in the target directory.

If I quit Outlook before coping then everything is working as expected.

I'm running XP SP3 if that matters and coping on a local drive.
User avatar
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Hello Husted,
If you search for Outlook on this forum, you will find related discussions. Their main point is that Outlook has a special way of locking files, not locking them whole but just a part of them, so TC would have to read the whole file to see if it is not locked.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I couldn't replicate the behaviour with binary.exe that was locked due to being launched. So possibly just an outlook specific issue as Hacker indicates: partial file lock.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is also that the lock can occur even after the download has started! The only solution would be to lock the file when downloading also in TC, but then it couldn't be previewed (e.g. partial zip or rar contents) while it is still downloading...
Author of Total Commander
https://www.ghisler.com
Post Reply