Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-empty .driverc interfering with drive pull's deletion of *.desktop when the parent google doc has already been deleted #785

Open
skatila opened this issue Nov 11, 2016 · 0 comments

Comments

@skatila
Copy link

skatila commented Nov 11, 2016

I am using drive version 0.3.8.1 and recently decided to use driverc instead of wrapping drive commands into aliases. However, it is not working out quiet as well.

For a google doc file named test, with a non-empty driverc, drive pull will leave both test and test.desktop in the local directory. With either an empty driverc or without a driverc, it will delete the test file but leave the test.desktop file. test is shown to be an empty file and test.desktop is ascii text.

Details follow;

I have non-empty .driverc in my local drive directory: [see at the very bottom for what happens with an empty .driverc]

user1@system1:~/gdrive$ cat .driverc 
depth=-1
hidden=false
no-clobber=true
exports-dir=~/_exports
exports=pdf,txt,odt

First thing, I am not exactly sure whether the driverc is doing anygood - it is certainly not automating my exports. I will figure it out some other day.

However the biggest problem is this.

After deleting a google doc file from drive (using web interface), the local file and it's associated *.desktop is not deleted by "drive pull".

To recreate:

Create a file named test in your drive

In you system, do

user1@system1:~/gdrive$ drive pull
Resolving...
+ /test2
Addition count 1
Proceed with the changes? [Y/n]:y
user1@system1:~/gdrive$ ls test2
test2          test2.desktop  
user1@system1:~/gdrive$ ls test2^C

Delete test2 from your google drive (through the web interface) - I even purged my trash.

Now, in your local system,

user1@system1:~/gdrive$ drive push
Resolving...
Everything is up-to-date.
user1@system1:~/gdrive$ drive pull
Resolving...
Everything is up-to-date.

But, after removing my .driverc,

user1@system1:~/gdrive$ mv .driverc ../gdriverc
user1@system1:~/gdrive$ drive pull
Resolving...
- /test2
Deletion count 1
Proceed with the changes? [Y/n]:y

However, everything is not topsy-turvy. It still leaves test2.desktop

user1@system1:~/gdrive$ ls test2.desktop ^C
user1@system1:~/gdrive$ ls test2*
test2.desktop

A bug? Or perhaps my driverc is not well-formed. @jean-christophe-manciot is going somewhere with #778 . driverc need to be well structured. Perhaps a json?

So, basically having the driverc prevents drive pull from deleting test2 and test2.desktop. Yet, removing driverc solves half the problem. test2.desktop still remains.

With an empty driverc

Just to make sure, I tried it with an empty driverc. drive pull managed to delete the test file but still left the test.desktop file. See:

user1@system1:~/gdrive$ rm test2.desktop 
user1@system1:~/gdrive$ touch .driverc
user1@system1:~/gdrive$ cat .driverc 
user1@system1:~/gdrive$ drive pull
Resolving...
+ /test3
Addition count 1
Proceed with the changes? [Y/n]:y
user1@system1:~/gdrive$ ls test3*
test3  test3.desktop
user1@system1:~/gdrive$ echo "test3 has been deleted from upstream, trash purged"
test3 has been deleted from upstream, trash purged
user1@system1:~/gdrive$ drive pull
Resolving...
- /test3
Deletion count 1
Proceed with the changes? [Y/n]:y
user1@system1:~/gdrive$ ls test3*
test3.desktop
user1@system1:~/gdrive$ rm test3.desktop
user1@system1:~/gdrive$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant