nautilus r14716 - in trunk: . libnautilus-private



Author: cneumair
Date: Sat Oct 11 11:20:53 2008
New Revision: 14716
URL: http://svn.gnome.org/viewvc/nautilus?rev=14716&view=rev

Log:
2008-10-11  Christian Neumair  <cneumair gnome org>

	* libnautilus-private/nautilus-file-operations.c
	(make_file_name_valid_for_dest_fs):
	Chop trailing space characters when moving to FAT file system. Fixes #555813.


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

Modified: trunk/libnautilus-private/nautilus-file-operations.c
==============================================================================
--- trunk/libnautilus-private/nautilus-file-operations.c	(original)
+++ trunk/libnautilus-private/nautilus-file-operations.c	Sat Oct 11 11:20:53 2008
@@ -2894,7 +2894,19 @@
 		    !strcmp (dest_fs_type, "msdos") ||
 		    !strcmp (dest_fs_type, "msdosfs")) {
 			gboolean ret;
+			int i, old_len;
+
 			ret = str_replace (filename, FAT_FORBIDDEN_CHARACTERS, '_');
+
+			old_len = strlen (filename);
+			for (i = 0; i < old_len; i++) {
+				if (filename[i] != ' ') {
+					g_strchomp (filename);
+					ret |= (old_len != strlen (filename));
+					break;
+				}
+			}
+
 			return ret;
 		}
 	}



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