Big file copy mode and modify-protected folder

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
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Big file copy mode and modify-protected folder

Post by *MVV »

E.g. I have folder in which my user account has special attributes:

Code: Select all

Create Files/Write Data (checked)
Create Folders/Append Data (checked)
Rest items (unchecked)
When I try to copy to this folder using standard mode, copying succeeds w/o elevation (create files allowed).
But when I try to copy files to this folder using big file copy mode, TC starts operation w/o asking, writes some piece of file and then tells that it is insufficient rights to copy file. So file is copied only partly (small files usually copied correctly) - size of copied part depends on block size (e.g. with 1024 KB block TC can copy 1024 KB of 1040 KB file or 9536 KB of 9567 KB file).

It is expected that TC will suggest to continue copy operation as administrator.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm sorry but this isn't possible. Why? "big file mode" uses "no buffering" option of CreateFile. In this mode, only multiples of the cluster size can be written. To write the end of the file, we need to either
- close the file, re-open in buffering mode, and write partial end (TC does this)
or
- write more than we actually need, and then truncate the file.

Both methods need to modify the file.

Currently it's not planned to split this function between TC and tcmadmin, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thanks for explanation.

Maybe TC will allow to continue incompleted copy operations just like in FTP sessions? It will allow to write partial ends of files and to continue copy operations that was failed for some reasons.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately this isn't currently possible beause TC allocates the needed disk space before writing data, so you couldn't see from the size of the file how much data has already been copied.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Yes, you're right, currently TC allocates space for entire file...
Post Reply