nautilus r14717 - in branches/gnome-2-24: . libnautilus-private



Author: cneumair
Date: Sat Oct 11 11:23:18 2008
New Revision: 14717
URL: http://svn.gnome.org/viewvc/nautilus?rev=14717&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 spaces when moving to FAT file system. Fixes #555813.


Modified:
   branches/gnome-2-24/ChangeLog
   branches/gnome-2-24/libnautilus-private/nautilus-file-operations.c

Modified: branches/gnome-2-24/libnautilus-private/nautilus-file-operations.c
==============================================================================
--- branches/gnome-2-24/libnautilus-private/nautilus-file-operations.c	(original)
+++ branches/gnome-2-24/libnautilus-private/nautilus-file-operations.c	Sat Oct 11 11:23:18 2008
@@ -2891,7 +2891,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]