poldek: poldek/misc.c - fixed non-existing paths handling (#110 re...

mis mis at pld-linux.org
Sun Feb 24 15:54:26 CET 2008


Author: mis                          Date: Sun Feb 24 14:54:26 2008 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- fixed non-existing paths handling (#110 related)

---- Files affected:
poldek/poldek:
   misc.c (1.62 -> 1.63) 

---- Diffs:

================================================================
Index: poldek/poldek/misc.c
diff -u poldek/poldek/misc.c:1.62 poldek/poldek/misc.c:1.63
--- poldek/poldek/misc.c:1.62	Sun Feb 24 14:20:19 2008
+++ poldek/poldek/misc.c	Sun Feb 24 15:54:21 2008
@@ -541,7 +541,7 @@
 
     rpath = realpath(path, NULL);
 
-    if (endslash) {
+    if (rpath && endslash) {
         int n = strlen(rpath);
         
         rpath = n_realloc(rpath, n + 2);
@@ -550,7 +550,7 @@
     }
 
     DBGF("%s -> %s\n", path, rpath);
-    return rpath;
+    return rpath ? rpath : path;
 }
 
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/misc.c?r1=1.62&r2=1.63&f=u



More information about the pld-cvs-commit mailing list