forked from lix-project/lix
libutil: try
restoring the cwd from fdSavedCwd
This commit is contained in:
parent
e135d223f6
commit
f89b0f7846
|
@ -1717,12 +1717,12 @@ void restoreMountNamespace()
|
|||
try {
|
||||
if (fdSavedMountNamespace && setns(fdSavedMountNamespace.get(), CLONE_NEWNS) == -1)
|
||||
throw SysError("restoring parent mount namespace");
|
||||
if (fdSavedCwd && fchdir(fdSavedCwd.get()) == -1) {
|
||||
throw SysError("restoring cwd");
|
||||
}
|
||||
} catch (Error & e) {
|
||||
debug(e.msg());
|
||||
}
|
||||
if (fdSavedCwd && fchdir(fdSavedCwd.get()) == -1) {
|
||||
throw SysError("restoring cwd");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue