mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 08:18:51 -05:00
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
@ -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…
Reference in New Issue
Block a user