Commit 02073e84 authored by Natanael Copa's avatar Natanael Copa

db: let apk_db_open() leave working dir as it was

parent 8a07b7fc
......@@ -706,6 +706,7 @@ int apk_db_open(struct apk_database *db, const char *root, unsigned int flags)
}
}
fchdir(apk_cwd_fd);
return 0;
ret_errno:
......@@ -713,6 +714,7 @@ ret_errno:
ret_r:
apk_error("%s: %s", msg, strerror(-r));
apk_db_close(db);
fchdir(apk_cwd_fd);
return r;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment