prasmussen / gdrive

Google Drive CLI Client
MIT License
8.99k stars 1.19k forks source link

Getting error `Root directoy is not empty, the initial sync requires an empty directory` #166

Open Anmol-Singh-Jaggi opened 8 years ago

Anmol-Singh-Jaggi commented 8 years ago

I am trying to sync a local directory with a non-empty directory on Drive.

I am executing the following command for doing so:

gdrive sync upload /path/to/local/dir <drive-directory-id>

but am getting the error Root directoy is not empty, the initial sync requires an empty directory (there's a typo in it by the way).

Is there any workaround for this? I don't want to re-upload multiple GB's of data.

DHOscar commented 8 years ago

The same problem here. Also because of this error, a folder can not proper shared with other developers. As if I create a folder on drive synced, the other developer in my team can not use sync function to edit the folder anymore.

4SiB commented 8 years ago

+1, the same problem. Sync upload should be continue what the GUI created. Re-index of data by gdrive should be normal.

bramkuijper commented 8 years ago

+1, the same problem. Why does sync upload need an empty directory in the first place? No rationale given for this in the source.

daparker commented 8 years ago

+1, the same problem. I uploaded many gigabytes of data into a folder on Google Drive and then wanted to sync new files after they were added to the local folder, but I got this error.

transbetty commented 8 years ago

I found a manual workaround, create the new directory via gdrive mkdir, then move/rename the directory to desired location and try the sync upload again. It worked it for me.

ThunderRoad75 commented 7 years ago

+1, the same problem.

This is just a major design failure, right?

What's the point of syncing if you can only sync into an empty directoy [sic]?

ThunderRoad75 commented 7 years ago

Stupid as it is, @transbetty's workaround works. Create an empty dummy directory, start syncing, then immediately move everything from the original directory into the dummy, and rename the dummy to the original.

SystemTN commented 6 years ago

Very easy. Ext: My local path: /home/data/movie Now, I login my GDrive and make new folder home, access home and make folder data, access data and make folder movie, and copy GDrive ID folder move => new path GDrive: /home/data/movie Finally, i use command line start sync local -> GDrive

./gdrive -c gdrive-config sync upload /home/data/movie [ID folder movie]

Good luck!

yangyxt commented 2 years ago

Stupid as it is, @transbetty's workaround works. Create an empty dummy directory, start syncing, then immediately move everything from the original directory into the dummy, and rename the dummy to the original.

I dont understand. That feels like gdrive upload -r (recursively) to a new dummy directory and then rename the dummy folder to the original folder... That will take the time of uploading an entire folder to gdrive..