mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #7803 from jplatte/chroot
Fix chroot trying to change into non-existent directory
This commit is contained in:
@@ -448,7 +448,7 @@ fn enter_chroot(root: &Path, skip_chdir: bool) -> UResult<()> {
|
||||
|
||||
if err == 0 {
|
||||
if !skip_chdir {
|
||||
std::env::set_current_dir(root).unwrap();
|
||||
std::env::set_current_dir("/").unwrap();
|
||||
}
|
||||
Ok(())
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user