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>
This commit is contained in:
parent
d5fa2da171
commit
7d5dca4043
1 changed files with 2 additions and 2 deletions
|
@ -745,7 +745,7 @@ int _alpm_db_getlastupdate(const pmdb_t *db, char *ts)
|
||||||
return(-1);
|
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 */
|
/* get the last update time, if it's there */
|
||||||
if((fp = fopen(file, "r")) == NULL) {
|
if((fp = fopen(file, "r")) == NULL) {
|
||||||
|
@ -777,7 +777,7 @@ int _alpm_db_setlastupdate(const pmdb_t *db, char *ts)
|
||||||
return(-1);
|
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) {
|
if((fp = fopen(file, "w")) == NULL) {
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue