GNOME Bugzilla – Bug 751481
Support database-backed storages
Last modified: 2015-09-11 11:55:36 UTC
See bug 741602 for the problem with database-backed storages and various API suggestions to solve it. An example of such a backend is the one for Google Drive being worked on in bug 739008
Created attachment 306076 [details] [review] file-operations: Let directory creation work on Google Drive
Review of attachment 306076 [details] [review]: You need to do similar things in the create file case, as well as the copy/move/link operations and the related create_dest_dir helper. ::: libnautilus-private/nautilus-file-operations.c @@ +6066,3 @@ + G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, + common->cancellable, + &error); I think this should all go into a helper function, because it needs to be done for the "create file" case too, after the g_file_copy(). @@ +6073,3 @@ + + is_volatile = g_file_info_get_attribute_boolean (info, + G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE); I would probably add a local #indef G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE that defines it. That way we avoid depending on a new glib directly. We can remove it in a while.
(In reply to Alexander Larsson from comment #2) > Review of attachment 306076 [details] [review] [review]: Thanks for taking a look, Alex. > You need to do similar things in the create file case, as well as the > copy/move/link operations and the related create_dest_dir helper. > > ::: libnautilus-private/nautilus-file-operations.c > @@ +6066,3 @@ > + G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, > + common->cancellable, > + &error); > > I think this should all go into a helper function, because it needs to be > done for the "create file" case too, after the g_file_copy(). Ok. I will do that once I move to testing those operations. > @@ +6073,3 @@ > + > + is_volatile = g_file_info_get_attribute_boolean (info, > + G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE); > > I would probably add a local #indef G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE > that defines it. That way we avoid depending on a new glib directly. We can > remove it in a while. I have add this now.
Created attachment 306159 [details] [review] file-operations: Let directory creation work on Google Drive
Created attachment 310813 [details] [review] file-operations: Let directory copy / move work on Google Drive Let me know if you want to squash these together.
Created attachment 310836 [details] [review] file-operations: Let directory creation work on Google Drive We recently fixed the backend to use paths, not URIs, as symlink-target. So we should be using g_file_resolve_relative_path here.
Created attachment 310837 [details] [review] file-operations: Let directory copy / move work on Google Drive
Created attachment 310897 [details] [review] file-operations: Let directory creation/copy/move work on Google Drive Refactor the mapping code and combine both patches into one.
Created attachment 310901 [details] [review] file-operations: Let file/directory creation work on Google Drive Cover the remaining file operations, and fix a typo. We ignore symlinks because the backend doesn't support them.
I think the ifdef is not necesary at all no? I think we are fine depending on new glib, as we usually depend on new gtk+ almost every release, so we are kinda used to require new libs every release.
Review of attachment 310901 [details] [review]: Code looks good with the glib bump nit and going together with https://bugzilla.gnome.org/show_bug.cgi?id=754785 ::: libnautilus-private/nautilus-file-operations.c @@ +3705,3 @@ + GFile *real_file = NULL; + +#ifdef G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE As said if Alex is okay, instead of ifdef, bump glib version. We don't want to have broken sidebar advertising drive support but not working, or confusion on packagers.
Created attachment 311051 [details] [review] file-operations: Let file/directory creation work on Google Drive
Review of attachment 311051 [details] [review]: LGTM
Comment on attachment 311051 [details] [review] file-operations: Let file/directory creation work on Google Drive Pushed to master. Thanks Carlos!