summaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 3ea8976..1c6ae9e 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1923,7 +1923,7 @@ static void apk_db_migrate_files(struct apk_database *db,
cstype |= APK_FI_NOFOLLOW;
r = apk_file_get_info(db->root_fd, name, cstype, &fi);
- if (ofile->name == NULL) {
+ if (ofile && ofile->diri->pkg->name == NULL) {
/* File was from overlay, delete the
* packages version */
unlinkat(db->root_fd, tmpname, 0);