Bug: "get" silently skips files with same name (-ext) as dir
Hi. First post here. Apologies for any info/protocol I've missed; will correct ASAP. Also apologies if this is a known bug; couldn't find mention of it with any searches I thought of.
WinSCP Version 4.3.9 (Build 1817) (OS 6.0.6002 Service Pack 2)
I'm using the following script to transfer two files, one of which has the same name as its containing directory (except for extension):
The second file transfers as expected. The first is silently skipped.
As a workaround, I can rename the first file, e.g. to just Foo.txt, and that does the trick.
As far as I can tell, this happens if and only if the source filename without extension matches its containing directory's name.
Log snippet:
WinSCP Version 4.3.9 (Build 1817) (OS 6.0.6002 Service Pack 2)
I'm using the following script to transfer two files, one of which has the same name as its containing directory (except for extension):
get -resume "/mnt/sdd1/debacle/files/FooBar/FooBar.txt" "Y:\MyRoot\FooBar\FooBar.txt" get -resume "/mnt/sdd1/debacle/files/FooBar/baz.jpg" "Y:\MyRoot\FooBar\baz.jpg"
The second file transfers as expected. The first is silently skipped.
As a workaround, I can rename the first file, e.g. to just Foo.txt, and that does the trick.
As far as I can tell, this happens if and only if the source filename without extension matches its containing directory's name.
Log snippet:
> 2012-07-31 15:29:53.587 Script: get -resume "/mnt/sdd1/debacle/files/FooBar/FooBar.txt" "Y:\MyRoot\FooBar\FooBar.txt" . 2012-07-31 15:29:53.589 Listing directory "/mnt/sdd1/debacle/files/FooBar". > 2012-07-31 15:29:53.590 Type: SSH_FXP_OPENDIR, Size: 80, Number: 523 < 2012-07-31 15:29:53.770 Type: SSH_FXP_HANDLE, Size: 13, Number: 523 > 2012-07-31 15:29:53.772 Type: SSH_FXP_READDIR, Size: 13, Number: 780 < 2012-07-31 15:29:53.954 Type: SSH_FXP_NAME, Size: 747, Number: 780 > 2012-07-31 15:29:53.956 Type: SSH_FXP_READDIR, Size: 13, Number: 1036 < 2012-07-31 15:29:54.137 Type: SSH_FXP_STATUS, Size: 28, Number: 1036 < 2012-07-31 15:29:54.139 Status code: 1 > 2012-07-31 15:29:54.141 Type: SSH_FXP_CLOSE, Size: 13, Number: 1284 > 2012-07-31 15:29:54.143 Script: get -resume "/mnt/sdd1/debacle/files/FooBar/baz.jpg" "Y:\MyRoot\FooBar\baz.jpg" . 2012-07-31 15:29:54.145 Listing directory "/mnt/sdd1/debacle/files/FooBar". > 2012-07-31 15:29:54.146 Type: SSH_FXP_OPENDIR, Size: 80, Number: 1547 < 2012-07-31 15:29:54.321 Type: SSH_FXP_STATUS, Size: 24, Number: 1284 . 2012-07-31 15:29:54.323 Discarding reserved response < 2012-07-31 15:29:54.500 Type: SSH_FXP_HANDLE, Size: 13, Number: 1547 > 2012-07-31 15:29:54.502 Type: SSH_FXP_READDIR, Size: 13, Number: 1804 < 2012-07-31 15:29:54.682 Type: SSH_FXP_NAME, Size: 747, Number: 1804 > 2012-07-31 15:29:54.684 Type: SSH_FXP_READDIR, Size: 13, Number: 2060 < 2012-07-31 15:29:54.865 Type: SSH_FXP_STATUS, Size: 28, Number: 2060 < 2012-07-31 15:29:54.870 Status code: 1 > 2012-07-31 15:29:54.871 Type: SSH_FXP_CLOSE, Size: 13, Number: 2308 . 2012-07-31 15:29:54.873 File: "/mnt/sdd1/debacle/files/FooBar/baz.jpg" . 2012-07-31 15:29:54.876 Copying "/mnt/sdd1/debacle/files/FooBar/baz.jpg" to local directory started. . 2012-07-31 15:29:54.878 Binary transfer mode selected. . 2012-07-31 15:29:54.883 Checking existence of partially transfered file. . 2012-07-31 15:29:54.890 Opening remote file. > 2012-07-31 15:29:54.892 Type: SSH_FXP_OPEN, Size: 112, Number: 2563 < 2012-07-31 15:29:55.056 Type: SSH_FXP_STATUS, Size: 24, Number: 2308 . 2012-07-31 15:29:55.058 Discarding reserved response < 2012-07-31 15:29:55.236 Type: SSH_FXP_HANDLE, Size: 13, Number: 2563 > 2012-07-31 15:29:55.239 Type: SSH_FXP_FSTAT, Size: 13, Number: 2824 > 2012-07-31 15:29:55.241 Type: SSH_FXP_READ, Size: 25, Number: 3077 . 2012-07-31 15:29:55.419 3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets. < 2012-07-31 15:29:55.423 Type: SSH_FXP_ATTRS, Size: 37, Number: 2824 . 2012-07-31 15:29:55.430 Storing reserved response < 2012-07-31 15:29:56.376 Status code: 1 . 2012-07-31 15:29:56.378 23 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets. > 2012-07-31 15:29:56.382 Type: SSH_FXP_CLOSE, Size: 13, Number: 6916 < 2012-07-31 15:29:56.384 Type: SSH_FXP_STATUS, Size: 28, Number: 6149 < 2012-07-31 15:29:56.562 Type: SSH_FXP_STATUS, Size: 28, Number: 6405 < 2012-07-31 15:29:56.751 Type: SSH_FXP_STATUS, Size: 28, Number: 6661 > 2012-07-31 15:29:58.747 Script: exit . 2012-07-31 15:29:58.749 Script: Exit code: 0 . 2012-07-31 15:29:58.750 Closing connection. . 2012-07-31 15:29:58.752 Sending special code: 12 . 2012-07-31 15:29:58.754 Sent EOF message