# Rclone copy doesn't fail when file doesn't exist in gstorage bucket

**URL:** <https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177>\
**Category:** Suspected Bug\
**Created:** [August 7, 2019, 10:35am UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177 "2019-08-07T10:35:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hermain](https://forum.rclone.org/letter_avatar_proxy/v4/letter/h/54ee81/32.png) [@hermain](https://forum.rclone.org/u/hermain)\
**Post date:** [August 7, 2019, 10:35am UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/1 "2019-08-07T10:35:46Z")

</div>

#### What is the problem you are having with rclone?

rclone copy doesn't fail when file source file I try to download doesn't exist in my gstorage bucket

I expect a different return code than 0 and some error message stating that the files does not exist in the bucket.

#### What is your rclone version (output from `rclone version`)

tested with v1.48.0 and v1.45.0

#### Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 16.04 64 bit

#### Which cloud storage system are you using? (eg Google Drive)

Gcloud storage

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

rclone -vv copy gcloud:redacted/ICE\_CREAM .

#### A log from the command with the `-vv` flag (eg output from `rclone -vv copy /tmp remote:tmp`)

2019/08/07 10:30:07 DEBUG : rclone: Version "v1.48.0" starting with parameters ["rclone" "-vv" "copy" "gcloud:redacted/ICE\_CREAM" "."]  
2019/08/07 10:30:07 DEBUG : Using config file from "/home/redacted/.config/rclone/rclone.conf"  
2019/08/07 10:30:08 INFO : Local file system at /home/redacted: Waiting for checks to finish  
2019/08/07 10:30:08 INFO : Local file system at /home/redacted: Waiting for transfers to finish  
2019/08/07 10:30:08 INFO :  
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -  
Errors: 0  
Checks: 0 / 0, -  
Transferred: 0 / 0, -  
Elapsed time: 100ms

2019/08/07 10:30:08 DEBUG : 7 go routines active  
2019/08/07 10:30:08 DEBUG : rclone: Version "v1.48.0" finishing with parameters ["rclone" "-vv" "copy" "gcloud:redacted/ICE\_CREAM" "."]

With configuration:  
[gcloud]  
type = google cloud storage  
service\_account\_file = /home/redacted/.config/rclone/s3\_creds  
location = eu

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [August 7, 2019, 1:26pm UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/2 "2019-08-07T13:26:32Z")

</div>

> [@hermain](#):
>
> gcloud:redacted/ICE\_CREAM

Does rclone ls gcloud:redacted/ICE\_CREAM return anything?

---

<div class="post-metadata">

**Author:** ![thestigma](https://forum.rclone.org/user_avatar/forum.rclone.org/thestigma/32/3414_2.png) [@thestigma](https://forum.rclone.org/u/thestigma)\
**Post date:** [August 8, 2019, 1:27am UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/3 "2019-08-08T01:27:45Z")

</div>

If ICE\_CREAM is an empty folder and the command is to copy all the files from that folder then copying 0 files and saying the job is complete seems like intended behavior that should not produce an error.

This doesn't produce an error, it just happens to end up doing nothing:  
rclone copy TD5:\EMPTYTEST E:\

These however will give you a (non fatal) error:  
rclone copy TD5:\EMPTYTEST\thisfiledoesnotexist.txt E:  
rclone copy TD5:\NONEXTANTDIR\ E:\

But this is fine:  
rclone copy TD5:\EMPTYTEST\thisfileexists.txt E:\

So maybe you are just misunderstanding the difference in referencing files vs folders. A copy command will not error as long as the folders (and file if you choose to specify one) exists, but if any of them are missing you should get errors as expected.

Hope this was helpful 🙂

---

<div class="post-metadata">

**Author:** ![hermain](https://forum.rclone.org/letter_avatar_proxy/v4/letter/h/54ee81/32.png) [@hermain](https://forum.rclone.org/u/hermain)\
**Post date:** [August 9, 2019, 11:39am UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/4 "2019-08-09T11:39:08Z")

</div>

ICE\_CREAM is neither a file nor a folder. It does not exist. So rclone should complain.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [August 9, 2019, 11:43am UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/5 "2019-08-09T11:43:52Z")

</div>

Oh, I'm sorry. I mis read and understand now.

File a bug report on the github as what you are saying I think would be a bug as well.

---

<div class="post-metadata">

**Author:** ![hermain](https://forum.rclone.org/letter_avatar_proxy/v4/letter/h/54ee81/32.png) [@hermain](https://forum.rclone.org/u/hermain)\
**Post date:** [August 9, 2019, 11:49am UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/6 "2019-08-09T11:49:19Z")

</div>

> <https://github.com/rclone/rclone/issues/3427>

  
Done

---

<div class="post-metadata">

**Author:** ![thestigma](https://forum.rclone.org/user_avatar/forum.rclone.org/thestigma/32/3414_2.png) [@thestigma](https://forum.rclone.org/u/thestigma)\
**Post date:** [August 9, 2019, 3:08pm UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/7 "2019-08-09T15:08:19Z")

</div>

> [@hermain](#):
>
> ICE\_CREAM is neither a file nor a folder. It does not exist. So rclone should complain.

In that case I agree. It does for me on Gdrive. Suspect it may be a backend spesific bug then.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [November 7, 2019, 3:08pm UTC](https://forum.rclone.org/t/rclone-copy-doesnt-fail-when-file-doesnt-exist-in-gstorage-bucket/11177/8 "2019-11-07T15:08:20Z")

</div>

Closed on November 7, 2019, 3:08pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
