brasero r1936 - in trunk: . src



Author: philippr
Date: Tue Feb 17 07:19:31 2009
New Revision: 1936
URL: http://svn.gnome.org/viewvc/brasero?rev=1936&view=rev

Log:
2009-02-17  Philippe Rouquier  <ykw localhost localdomain>

	Workaround an inconsistency in GVFS burn:// backend which leads to
	return true for g_file_info_get_is_symlink () and G_FILE_TYPE_REGULAR or
	G_FILE_TYPE_DIRECTORY for g_file_info_get_file_type () when we ask not
	to follow symlinks in GIO

	* src/brasero-data-vfs.c (brasero_data_vfs_directory_load_result),
	(brasero_data_vfs_loading_node_result):

Modified:
   trunk/ChangeLog
   trunk/src/brasero-data-vfs.c

Modified: trunk/src/brasero-data-vfs.c
==============================================================================
--- trunk/src/brasero-data-vfs.c	(original)
+++ trunk/src/brasero-data-vfs.c	Tue Feb 17 07:19:31 2009
@@ -516,6 +516,15 @@
 						       uri);
 				return;
 			}
+
+			if (!priv->replace_sym) {
+				/* This is to workaround a small inconsistency
+				 * in GVFS burn:// backend. When there is a
+				 * symlink in burn:// and we are asked not to 
+				 * follow symlinks then the file type is not
+				 * G_FILE_TYPE_SYMBOLIC_LINK */
+				g_file_info_set_file_type (info, G_FILE_TYPE_SYMBOLIC_LINK);
+			}
 		}
 
 		brasero_data_project_add_node_from_info (BRASERO_DATA_PROJECT (self),
@@ -711,7 +720,7 @@
 		}
 	}
 
-	/* NOTE: we don't check for a broken symlink here since the  user chose
+	/* NOTE: we don't check for a broken symlink here since the user chose
 	 * to add it. So even if it were we would have to add it. The same for
 	 * hidden files. */
 	for (iter = nodes; iter; iter = iter->next) {
@@ -737,6 +746,15 @@
 		/* NOTE: check is loading here on purpose. Otherwise directories
 		 * that replace a temp parent wouldn't load since they are also
 		 * reloading. */
+		if (g_file_info_get_is_symlink (info)
+		&& !priv->replace_sym) {
+			/* This is to workaround a small inconsistency
+			 * in GVFS burn:// backend. When there is a
+			 * symlink in burn:// and we are asked not to 
+			 * follow symlinks then the file type is not
+			 * G_FILE_TYPE_SYMBOLIC_LINK */
+			g_file_info_set_file_type (info, G_FILE_TYPE_SYMBOLIC_LINK);
+		}
 
 		if (!node->is_loading) {
 			brasero_data_project_node_reloaded (BRASERO_DATA_PROJECT (self),



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