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

cute-signatures
Natanael Copa 2009-01-21 09:03:10 +00:00
parent 8a07b7fc72
commit 02073e84d6
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}