Hello,
I'm using wget-1.8.1+cvs. I periodically mirror an ftp server (UNIX
machine). Everything works fine but there is a small problem.
There is a folder that contains space characters in its name. I use a
shell script which locally deletes remotely deleted files. It starts
after wget finishes. It uses .listing to do the job.
Unfortunately, wget processes folder and file names differently. It
converts spaces in folder names to '%20' ('@20' on Windows) but doesn't
touch file names. And it stores unconverted names in .listing file. As a
result, my script always deletes local folder (with '%20') because it
can't find it in .listing and next time wget downloads the folder again.
I reproduced a problem with the source file structure (on the UNIX ftp
server) which looked like this:
hostname
+- Test/
+- TheFolderWithoutSpaces/
| +- One more test file.txt
+- This is a test folder/
| +- This is one more test.txt
+- This is a text file.txt
The resulting target local file structure (UNIX) looked like this:
hostname
+- .listing
+- Test/
+- .listing
+- TheFolderWithoutSpaces/
| +- .listing
| +- One more test file.txt
+- This%20is%20a%20test%20folder/
| +- .listing
| +- This is one more test.txt
+- This is a text file.txt
I'm attaching the file hostname/Test/.listing bellow.
Is it a bug or a feature?
Couldn't folder and file names be processed in the same way (with or
without space conversion)?
Could wget put the same names in .listing and local file system?
Best regards,
Alexey
total 1
drwxr-xr-x 4 23543 503 4096 Jan 16 22:08 .
drwxrwxr-x 4 23543 503 4096 Jan 16 18:34 ..
drwxr-xr-x 2 23543 503 4096 Jan 16 19:45 TheFolderWithoutSpaces
-rw-r--r-- 1 23543 503 80 Jan 16 18:40 This is a test file.txt
drwxr-xr-x 2 23543 503 4096 Jan 16 18:38 This is a test folder