Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=c1efb1e32b328db0503334352da9d5ff10d43d30

commit c1efb1e32b328db0503334352da9d5ff10d43d30
Author: Michel Hermier <herm...@frugalware.org>
Date:   Mon Aug 8 00:13:28 2011 +0200

be_files.c: Unifiy .lastupdate file for local and archives databases.

diff --git a/lib/libpacman/be_files.c b/lib/libpacman/be_files.c
index cef2bc3..e3f4c3e 100644
--- a/lib/libpacman/be_files.c
+++ b/lib/libpacman/be_files.c
@@ -850,10 +850,7 @@ int _pacman_db_getlastupdate(pmdb_t *db, char *ts)
return(-1);
}

-       if (islocal(db))
-               snprintf(file, PATH_MAX, "%s%s/%s/.lastupdate", handle->root, 
handle->dbpath, db->treename);
-       else
-               snprintf(file, PATH_MAX, "%s%s/%s.lastupdate", handle->root, 
handle->dbpath, db->treename);
+       snprintf(file, PATH_MAX, "%s%s/%s.lastupdate", handle->root, 
handle->dbpath, db->treename);

/* get the last update time, if it's there */
if((fp = fopen(file, "r")) == NULL) {
@@ -883,11 +880,7 @@ int _pacman_db_setlastupdate(pmdb_t *db, char *ts)
return(-1);
}

-       if (islocal(db))
-               snprintf(file, PATH_MAX, "%s%s/%s/.lastupdate", handle->root, 
handle->dbpath, db->treename);
-       else {
-               snprintf(file, PATH_MAX, "%s%s/%s.lastupdate", handle->root, 
handle->dbpath, db->treename);
-       }
+       snprintf(file, PATH_MAX, "%s%s/%s.lastupdate", handle->root, 
handle->dbpath, db->treename);

if((fp = fopen(file, "w")) == NULL) {
return(-1);
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to