summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-09-28 23:21:56 -0500
committerDan McGee <dan@archlinux.org>2007-09-28 23:27:14 -0500
commit7d5dca4043b5f4ff94cd6033fccd4eadb3610a66 (patch)
tree7c7bb62787c474cf62e6ae6dec3905df67ac81e3
parentd5fa2da171c9f78e3b31053fe70b5ea24962a9c8 (diff)
downloadpacman-7d5dca4043b5f4ff94cd6033fccd4eadb3610a66.tar.xz
libalpm/be_files: Fix outdated code setting path for lastupdate file
The code for setting the lastupdate file path still referenced both the root and dbpath, when we should only be using dbpath. Fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/be_files.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c
index 06891ef5..2bfdb956 100644
--- a/lib/libalpm/be_files.c
+++ b/lib/libalpm/be_files.c
@@ -745,7 +745,7 @@ int _alpm_db_getlastupdate(const pmdb_t *db, char *ts)
return(-1);
}
- snprintf(file, PATH_MAX, "%s%s.lastupdate", handle->root, db->path);
+ snprintf(file, PATH_MAX, "%s.lastupdate", db->path);
/* get the last update time, if it's there */
if((fp = fopen(file, "r")) == NULL) {
@@ -777,7 +777,7 @@ int _alpm_db_setlastupdate(const pmdb_t *db, char *ts)
return(-1);
}
- snprintf(file, PATH_MAX, "%s%s.lastupdate", handle->root, db->path);
+ snprintf(file, PATH_MAX, "%s.lastupdate", db->path);
if((fp = fopen(file, "w")) == NULL) {
return(-1);