nautilus r14757 - in trunk: . libnautilus-private



Author: alexl
Date: Wed Oct 22 08:51:51 2008
New Revision: 14757
URL: http://svn.gnome.org/viewvc/nautilus?rev=14757&view=rev

Log:
2008-10-22  Alexander Larsson  <alexl redhat com>

	* libnautilus-private/nautilus-file.c
	(nautilus_file_get_symbolic_link_target_uri/path):
	Don't assert on symbolic links always marked as symlinks.
	Some broken backends will give this (like the archive backend).
	Fixes crash in #547468



Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-file.c

Modified: trunk/libnautilus-private/nautilus-file.c
==============================================================================
--- trunk/libnautilus-private/nautilus-file.c	(original)
+++ trunk/libnautilus-private/nautilus-file.c	Wed Oct 22 08:51:51 2008
@@ -6009,7 +6009,9 @@
 char *
 nautilus_file_get_symbolic_link_target_path (NautilusFile *file)
 {
-        g_return_val_if_fail (nautilus_file_is_symbolic_link (file), NULL);
+	if (!nautilus_file_is_symbolic_link (file)) {
+		g_warning ("File has symlink target, but  is not marked as symlink");
+	}
 
 	return g_strdup (file->details->symlink_name);
 }
@@ -6028,8 +6030,10 @@
 {
 	GFile *location, *parent, *target;
 	char *target_uri;
-	
-        g_return_val_if_fail (nautilus_file_is_symbolic_link (file), NULL);
+
+	if (!nautilus_file_is_symbolic_link (file)) {
+		g_warning ("File has symlink target, but  is not marked as symlink");
+	}
 
 	if (file->details->symlink_name == NULL) {
 		return NULL;



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