-CopyStreams=0 is ignored

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

AndrewCreator
Member
Member
Posts: 122
Joined: 2011-10-10, 23:25 UTC

-CopyStreams=0 is ignored

Post by *AndrewCreator »

ADS are copied with file even if CopyStreams=0 is specified.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If you use the default copy method (CopyFileEx) or the Explorer method, the ADS are copied by Windows, not TC. There is no way to prevent this from happening.
Author of Total Commander
https://www.ghisler.com
AndrewCreator
Member
Member
Posts: 122
Joined: 2011-10-10, 23:25 UTC

Post by *AndrewCreator »

I have not specified niether ExplorerForCopy nor CopyStreams because their default values were 0. Now I have specified them explicitly and have performed one more test.

Code: Select all

>type wincmd.ini | findstr UseIni
UseIniInProgramDir=7

>type wincmd.ini | findstr Explorer
ExplorerForCopy =0

>type wincmd.ini | findstr Streams
CopyStreams=0

>echo stream_data > test:stream

>type test:stream
The filename, directory name, or volume label syntax is incorrect.
"type" command does not support reading stream data, therefore I use "cat" from CoreUtils for Windows.

Code: Select all

>cat test:stream
stream_data

>totalcmd
Now I copy "test" to "test_copied" using Shift+F5.

Code: Select all

>cat test_copied:stream
stream_data
It seems, bug exists.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

AndrewCreator,
Standard copy method is enabled via option 'Use standard copy method (recommended)' under Copy/Delete tab of TC configuration dialog (and it corresponds to CopyDefaultMethod=1).
Explorer method is enabled via option 'Use copy+paste via Explorer (only in case of copy problems)' (and corresponds to combination CopyDefaultMethod=0, ExplorerForCopy=1).

As far as I understand, you have to use old methods 'Use default method only (reliable, not very fast)' or 'Also use big file copy mode (not using cache)' in order to be able to ignore ADS because in other modes TC just asks OS or Explorer to perform copy.

And I think such detail should be mentioned in description of CopyStreams option.
AndrewCreator
Member
Member
Posts: 122
Joined: 2011-10-10, 23:25 UTC

Post by *AndrewCreator »

2MVV, tahnk you for your answer. After some tests I was able to copy file without stream.

2ghisler(Author), could you check the issue? Streams are not copied if both
CopyDefaultMethod=0
and
CopyStreams=0
are specified. If I comment CopyStreams option, streams are copied insite of default value is 0.

It seems CopyStreams default value has no effect, it should be specified explicitly.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Do you have parameter ExplorerForCopy=1 set? If yes, try to remove it.

And, I recommend to use TC configuration dialog for changing copy mode, TC will set values as it expects.
AndrewCreator
Member
Member
Posts: 122
Joined: 2011-10-10, 23:25 UTC

Post by *AndrewCreator »

2MVV, no, I have no such param.

Code: Select all

>type wincmd.ini | findstr /I copy
AlwaysCopyInBackground=1
CopyDefaultMethod=0
CopyDirTimeStamp=1
CopyLinks=2
CopyStreams=0
LongNameCopy=2
ShowCopyOptions=1
I have performed a bit more research and I am wondered. Below is the summary (unfortunately, forum does not support BBCode tables, so I am putting it in plain text).

Configuration section is clean as much as possible (at most 4 params are specified), wincmd.ini file is read-only.

Code: Select all

[Configuration]
;CopyDefaultMethod=
;CopyStreams=
;ExplorerForCopy=
UseIniInProgramDir=7

[FileSystemPlugins]
...
And here are the results:

Code: Select all

CopyDefaultMethod    CopyStreams    ExplorerForCopy    Are streams copied using Shift+F5?

Commented            Commented      Commented          Y
Commented            0              Commented          Y
1                    0              Commented          Y (should be specified in help)
0                    Commented      Commented          Y (unexpected)
0                    0              Commented          N
0                    0              0                  N
0                    0              1                  N (might be unexpected)
Last edited by AndrewCreator on 2014-03-09, 08:07 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

By default CopyDefaultMethod=1, so when it is set to 1 or commented, streams should be copied. However it is interesting why streams weren't copied in case of explorer (copy+paste) method.

Here list of INI parameters when I change modes via TC configuration dialog:
; standard
ExplorerForCopy=0

; default
ExplorerForCopy=0
CopyDefaultMethod=0

; big file copy mode
ExplorerForCopy=0
CopyHugeBlockSize=10240
CopyHugeBlockSizeOther=64
CopyDefaultMethod=0

; explorer after default
ExplorerForCopy=1
CopyDefaultMethod=0

; explorer after big file copy mode
ExplorerForCopy=1
CopyHugeBlockSize=10240
CopyHugeBlockSizeOther=64
CopyDefaultMethod=0
I haven't check if streams are copied in each mode though.
AndrewCreator
Member
Member
Posts: 122
Joined: 2011-10-10, 23:25 UTC

Post by *AndrewCreator »

I have updated the results (added one more row and comments).
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I just tested different modes with CopyStreams=0 and stream was copied in explorer mode.

With CopyStreams=0 only default and big file copy methods have ignored streams, and it is expected.

However stream was copied in all modes w/o CopyStreams set so it seems that default value for this parameter is CopyStreams=1 (while help says the opposite). :!:
AndrewCreator
Member
Member
Posts: 122
Joined: 2011-10-10, 23:25 UTC

Post by *AndrewCreator »

I hope, Christian will notice this issue soon.

MVV, can I ask you to perform the test in the same way like me? Just to be sure the results are the same? Hope, this will not took more than 10-15 mins.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There is no issue, it's as I said above.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

AndrewCreator,
I posted above values that TC sets in different modes, so you can compare them. Anyway, I think that changing INI settings is a way to find errors where they shouldn't occur, just because you can change something in wrong way than TC expects. So configuration dialog is the preferred way to switch modes. Also, you should note that you have to restart TC after editing INI directly.

ghisler(Author),
I think you should add a note in help that it is impossible to ignore streams in standard and explorer modes. Also there is a one thing that I don't understand, I posted it above: help says that CopyStreams=0 is default value but TC copies streams in all modes when CopyStreams is not set so it seems that default value is CopyStreams=1. Who is right, TC or help file?
AndrewCreator
Member
Member
Posts: 122
Joined: 2011-10-10, 23:25 UTC

Post by *AndrewCreator »

2ghisler(Author)
I have checked for version 9.0.

The following wincmd.ini causes stream to be copied.

Code: Select all

[Configuration]
CopyDefaultMethod=0
;CopyStreams=
ExplorerForCopy=0
UseIniInProgramDir=7
I think CopyStreams default value is 1, not 0. Is this a bug in help file or in TC?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, CopyStreams=1 is indeed the default. I will update the help. Thanks for your report.
Author of Total Commander
https://www.ghisler.com
Post Reply