seung-lab / cloud-files

Threaded Python and CLI client library for AWS S3, Google Cloud Storage (GCS), in-memory, and the local filesystem.
BSD 3-Clause "New" or "Revised" License
36 stars 8 forks source link

Behavior of cp changed since 4.14.0 #95

Closed ranlu closed 11 months ago

ranlu commented 11 months ago

With cloud-files 4.13.0, if I run cloudfiles cp test_file /tmp/nonexist/, cf will create /tmp/nonexist/ and then copy the file, since 4.14.0 cf fails with a FileNotFoundError if the target folder does not exist already. With the newer version, I have to treat local operation differently, while the old behavior was more consistent with other protocols like gs and s3.

william-silversmith commented 11 months ago

Hi Ran!

On MacOS I created the following test case:

(ig) wms:~/code/igneous/projects/fly_synapses$ cloudfiles cp hello.txt ./amazing/
(ig) wms:~/code/igneous/projects/fly_synapses$ cloudfiles cp hello.txt /tmp/notexists/
(ig) wms:~/code/igneous/projects/fly_synapses$ ls /tmp/notexists 
hello.txt

Have you tried updating to the latest version?

ranlu commented 11 months ago

You are right, I pinned the version to avoid issue #92. It seems that issue is also fixed after 4.18. I will close both issues.