[GRASS-SVN] r35920 - grass/branches/develbranch_6/general/manage/cmd

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 18 19:12:30 EST 2009


Author: hamish
Date: 2009-02-18 19:12:30 -0500 (Wed, 18 Feb 2009)
New Revision: 35920

Modified:
   grass/branches/develbranch_6/general/manage/cmd/rename.c
Log:
Make old == new check case-insensitive (merge from trunk + comments & updated warning)

Modified: grass/branches/develbranch_6/general/manage/cmd/rename.c
===================================================================
--- grass/branches/develbranch_6/general/manage/cmd/rename.c	2009-02-18 18:16:34 UTC (rev 35919)
+++ grass/branches/develbranch_6/general/manage/cmd/rename.c	2009-02-19 00:12:30 UTC (rev 35920)
@@ -84,8 +84,9 @@
 		G_warning(_("<%s> is an illegal file name"), new);
 		continue;
 	    }
-	    if (strcmp(old, new) == 0) {
-		G_warning(_("%s=%s,%s: files are the same, no rename required"),
+	    if (G_strcasecmp(old, new) == 0) {
+		/* avoid problems on case-insensitive file systems (FAT, NTFS, ...) */
+		G_warning(_("%s=%s,%s: files could be the same, no rename possible"),
 			  parm[n]->key, old, new);
 		continue;
 	    }



More information about the grass-commit mailing list