poldek: poldek/misc.c - resolve '.' path too (rpm fails with '.' d...

mis mis at pld-linux.org
Tue Jan 22 18:54:58 CET 2008


Author: mis                          Date: Tue Jan 22 17:54:58 2008 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- resolve '.' path too (rpm fails with '.' database/rootdir path)

---- Files affected:
poldek/poldek:
   misc.c (1.59 -> 1.60) 

---- Diffs:

================================================================
Index: poldek/poldek/misc.c
diff -u poldek/poldek/misc.c:1.59 poldek/poldek/misc.c:1.60
--- poldek/poldek/misc.c:1.59	Mon Jul  2 18:39:22 2007
+++ poldek/poldek/misc.c	Tue Jan 22 18:54:53 2008
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2000 - 2007 Pawel A. Gajda <mis at pld-linux.org>
+  Copyright (C) 2000 - 2008 Pawel A. Gajda <mis at pld-linux.org>
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License, version 2 as
@@ -524,7 +524,7 @@
 
 char *util__abs_path(const char *path) 
 {
-    if (strstr(path, "./") == NULL)
+    if (n_str_ne(path, ".") && strstr(path, "./") == NULL)
         return NULL;
     
 #ifdef HAVE_CANONICALIZE_FILE_NAME /* have safe GNU ext? */
@@ -708,7 +708,6 @@
     return rv;
 }
 
-    
 char *strtime_(time_t t) 
 {
     char buf[128];
================================================================

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



More information about the pld-cvs-commit mailing list