[bijiben/gnome-3-14] OwnCloud : ensure Notes folder exists (webdav)



commit 8ece1d7ec5bf704d37e72bfc2863a753bb0620cd
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Sun Nov 9 00:03:51 2014 +0100

    OwnCloud : ensure Notes folder exists (webdav)
    
    try to make the directory in case it does not exist.
    This commit implements this only for the webdav case.

 src/libbiji/provider/biji-own-cloud-provider.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/libbiji/provider/biji-own-cloud-provider.c b/src/libbiji/provider/biji-own-cloud-provider.c
index f63f2fa..e969160 100644
--- a/src/libbiji/provider/biji-own-cloud-provider.c
+++ b/src/libbiji/provider/biji-own-cloud-provider.c
@@ -514,10 +514,11 @@ static void
 handle_mount (BijiOwnCloudProvider *self)
 {
   GFile *root;
+       BijiOwnCloudProviderPrivate *priv = self->priv;
 
   root = NULL;
-  if (G_IS_MOUNT (self->priv->mount))
-    root = g_mount_get_root (self->priv->mount);
+  if (G_IS_MOUNT (priv->mount))
+    root = g_mount_get_root (priv->mount);
 
 
   if (G_IS_FILE (root))
@@ -525,8 +526,9 @@ handle_mount (BijiOwnCloudProvider *self)
     /* OwnCloud Notes folder is not localized.
      * https://github.com/owncloud/notes/issues/7 */
 
-    self->priv->folder = g_file_get_child (root, "Notes");
-    self->priv->monitor = g_file_monitor_directory
+    priv->folder = g_file_get_child (root, "Notes");
+    g_file_make_directory (priv->folder, NULL, NULL);
+    priv->monitor = g_file_monitor_directory
       (self->priv->folder, G_FILE_MONITOR_NONE, NULL, NULL); // cancel, error
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]