Author: rmottola
Date: Fri Mar 17 15:11:14 2017
New Revision: 40397

URL: http://svn.gna.org/viewcvs/gnustep?rev=40397&view=rev
Log:
Skip file if no valid filename could be retrieved most probably due to Charset 
mismatches, this is is more a last resort: probably a lossy conversion should 
be attempted before

Modified:
    libs/base/trunk/ChangeLog
    libs/base/trunk/Source/NSFileManager.m

Modified: libs/base/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=40397&r1=40396&r2=40397&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog   (original)
+++ libs/base/trunk/ChangeLog   Fri Mar 17 15:11:14 2017
@@ -1,3 +1,8 @@
+2017-03-17 Riccardo Mottola <r...@gnu.org>
+
+       * Source/NSFileManager.m:(nextObject of Enumerator)
+       Skip file if no valid filename could be retrieved most probably due to 
Charset mismatches, this is is more a last resort: probably a lossy conversion 
should be attempted before.
+
 2017-03-17  Richard Frith-Macdonald <r...@gnu.org>
 
        * Source/NSTimeZones/NSTimeZones.tar: Updated with latest information.

Modified: libs/base/trunk/Source/NSFileManager.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSFileManager.m?rev=40397&r1=40396&r2=40397&view=diff
==============================================================================
--- libs/base/trunk/Source/NSFileManager.m      (original)
+++ libs/base/trunk/Source/NSFileManager.m      Fri Mar 17 15:11:14 2017
@@ -1,7 +1,7 @@
-/**
+ /**
    NSFileManager.m
 
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
 
    Author: Mircea Oancea <mir...@jupiter.elcom.pub.ro>
    Author: Ovidiu Predescu <ovi...@net-community.com>
@@ -2505,6 +2505,10 @@
            stringWithFileSystemRepresentation: dirbuf->d_name
            length: strlen(dirbuf->d_name)];
 #endif
+         /* if we have a null FileName something went wrong (charset?) and we 
skip it */
+         if (returnFileName == nil)
+           continue;
+         
          returnFileName = RETAIN([dir.path stringByAppendingPathComponent:
            returnFileName]);
 


_______________________________________________
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to