[GRASS-SVN] r35921 - grass/branches/releasebranch_6_4/general/manage/cmd

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 18 19:13:42 EST 2009


Author: hamish
Date: 2009-02-18 19:13:42 -0500 (Wed, 18 Feb 2009)
New Revision: 35921

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

Modified: grass/branches/releasebranch_6_4/general/manage/cmd/rename.c
===================================================================
--- grass/branches/releasebranch_6_4/general/manage/cmd/rename.c	2009-02-19 00:12:30 UTC (rev 35920)
+++ grass/branches/releasebranch_6_4/general/manage/cmd/rename.c	2009-02-19 00:13:42 UTC (rev 35921)
@@ -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