lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.1k stars 161 forks source link

mirror with --no-empty-dirs still tries to chmod #545

Closed stevegee58 closed 4 years ago

stevegee58 commented 5 years ago

If I do a mirror with --no-empty-dirs and the source has empty dirs the empties are not moved which is good. The problem is lftp still tries to chmod the empty dirs even though they were not moved. Debug output:

$ ./src/lftp -u trogdor,trogdor ftp://sg303-sn595/ -e "debug 1;cd steve_test/lftp_test&&mirror --no-empty-dirs --parallel=30 --verbose=2 . ./destination_folder;exit";echo "return code:" $? cd ok, cwd=/ cd ok, cwd=/steve_test/lftp_test ---- Connecting to sg303-sn595 (10.0.18.79) port 21 ---- Connecting to sg303-sn595 (10.0.18.79) port 21 Finished mirror empty_directory_2' Making directorydirectory_with_files' Transferring file directory_with_files/hi_steve.txt' Finished mirrorempty_directory_1' Finished transfer directory_with_files/hi_steve.txt' (9 B/s) Finished mirrordirectory_with_files' ./empty_directory_1: No such file or directory chmod: Access failed: ./empty_directory_1: No such file or directory ./empty_directory_2: No such file or directory chmod: Access failed: ./empty_directory_2: No such file or directory Total: 1 directory, 2 files, 0 symlinks New: 1 file, 0 symlinks 9 bytes transferred 2 errors detected return code: 1