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

Error thrown when deleting local version of shared file #47

Closed
j0nn0 opened this issue Nov 28, 2015 · 6 comments
Closed

Error thrown when deleting local version of shared file #47

j0nn0 opened this issue Nov 28, 2015 · 6 comments

Comments

@j0nn0
Copy link

j0nn0 commented Nov 28, 2015

When I delete a local copy of a file that has been shared with me on GDrive (owned by my partner), then I get the following:

sync "./Interview Audio/davedonde1.mp4" deleted in local. deleting remote
exception: /home/jon/bin/grive2-master/libgrive/src/protocol/AuthAgent.cc(142): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr4http5ErrorEEE
[PN2gr4expt12BacktraceTagE] = #0 0x4f5622 :0 gr::Exception::Exception()
#1 0x4d4d2d :0 gr::http::Error::Error()
#2 0x4da3c5 :0 gr::AuthAgent::CheckHttpResponse(long, std::string const&, gr::http::Header const&)
#3 0x4d9f13 :0 gr::AuthAgent::Request(std::string const&, std::string const&, gr::SeekStream_, gr::DataStream_, gr::http::Header const&)
#4 0x4d2bbc :0 gr::http::Agent::Post(std::string const&, std::string const&, gr::DataStream*, gr::http::Header const&)
#5 0x4cd4ae :0 gr::v2::Syncer2::DeleteRemote(gr::Resource*)
#6 0x4fffb9 :0 gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#7 0x4ffba0 :0 gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#8 0x503539 :0 boost::mfi::mf3<void, gr::Resource, gr::Syncer*, gr::DateTime&, gr::Val const&>::operator()(gr::Resource, gr::Syncer_, gr::DateTime&, gr::Val const&) const

[...] -- please see attached for full error message.

Using grive version 0.4.2-pre Nov 12 2015 11:49:25
grive_error.txt

(Obviously I can work around this by managing shared files on the web interface instead.)

@vitalif
Copy link
Owner

vitalif commented Nov 29, 2015

What do you expect grive to do when you try to delete a file which you don't have the permission to delete? :)

@oOZeVsOo
Copy link

oOZeVsOo commented Dec 1, 2015

You could:

  • Do nothing and just output a message "can't delete file X on server"
    and/or
  • Download the file again from server (in order to keep client and server synced)

The crashing is quite annoying since the applications stops and won't go any further.

Thanks

@j0nn0
Copy link
Author

j0nn0 commented Dec 13, 2015

I take your sarcasm with a pinch of salt ;) ... shared files in G-drive are analogous to Unix links, for which I have read/write privileges (but not outright delete). If you delete a shared file in G-drive (on the web interface), it disappears from your drive, but still belongs to the originator of the file. So it's not like I don't have permission - the shared file is mine in "link" form only, so I should be able to delete the "link".

As most of my work is collaborative, this is a major issue for me, although probably not such a major one for other people.

@vitalif
Copy link
Owner

vitalif commented Dec 13, 2015

Hm, that's interesting, and does the file still remain shared with you after deleting it in gdrive web ui? Or it just becomes "hidden" in some way?
I understand the crash is disappointing :) by now it looks like the simplest fix is to ignore permission errors when syncing. However, after such "partial" syncs the state of working directory becomes inconsistent, and grive currently can't track this inconsistency because it only remembers the last modification timestamp. So grive really needs a local "index" like git...
And what did you want to do with that file when you've deleted it? Did you just want to exclude it from sync? (and so remove from the working directory?)

@j0nn0
Copy link
Author

j0nn0 commented Dec 14, 2015

It disappears from my Google Drive, and Google gives message: "Removed one folder. One folder is still accessible to collaborators. [UNDO]". If I need to look at the file at some later date, my partner can simply send me the link, or re-share it with me (or I can find the email she sent me with the share link). The idea is to exclude it from sync, remove it from the working directory (I like to reduce clutter ;) ). Interestingly, shared files are not moved to the Bin folder, they are just 'gone.'

In Windows/Mac versions of G-drive, this is maintained in the sync. So if I delete a file, my own or a shared one, on the web interface, it will disappear from my local Google Drive folder, and the web G-Drive will move it to the Bin folder.

Similarly, with files or folders that are shared with me, if I don't want them in my root folder, I can move them to another folder in my directory tree. This doesn't interfere with the ownership, so collaborators don't even know I've moved it, as the Google Docs URL is still the same.

@vitalif vitalif closed this as completed in 0112330 Jan 5, 2016
@vitalif
Copy link
Owner

vitalif commented Jan 5, 2016

Try the master branch, it has a fix for this issue now.

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

3 participants