scp.py icon indicating copy to clipboard operation
scp.py copied to clipboard

Request for enhancement support to download all regular file in case of there is non-regular file under one folder

Open liliangnike opened this issue 2 years ago • 3 comments

In one server folder, there are several regular files and one pipe file (non-regular file). From client side, when we are using scp command to download the folder, though scp command prompts for the non-regular file and return value is 1, but it does not stop here and continue to download all the other remaining regular files . [root@rdcrh8vm2 ~]# scp -rP 5022 [email protected]:/var/log/ . [email protected]'s password: scp: /var/log/callstack_req_fifo: not a regular file wallander_finish 100% 0 0.0KB/s 00:00 messages 100% 107KB 1.0MB/s 00:00 messages.0 100% 200KB 966.3KB/s 00:00 last_reboot_reason 100% 22 8.7KB/s 00:00 _isam_action_collect_load_average_15sec.json_action_done 100% 0 0.0KB/s 00:00

While for Python module, if I am correct, Python scp will throw SCPException when detecting the file is non-regular file and it stops to continue to download other regular files. The behavior is not identical to native scp command.

For native scp command, in this case

  1. Ignore non-regular file and prompt..
  2. Download all regular files.
  3. Return value is 1.

We are expecting the same behavior like native scp command. Thanks!

liliangnike avatar Nov 15 '23 12:11 liliangnike

Hello Guys,

Any progress on this? Thanks!

Regards,

liliangnike avatar Nov 21 '23 02:11 liliangnike

I don't think anyone is working on this, but you can!

remram44 avatar Nov 21 '23 02:11 remram44

Let me have a try. The code change has been done. I will consider and test more cases.

liliangnike avatar Nov 22 '23 01:11 liliangnike