mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
Allow cd .. into empty directories
This commit is contained in:
@@ -30,7 +30,11 @@ export function cd(
|
||||
terminal.error("Invalid path. Failed to change directories");
|
||||
return;
|
||||
}
|
||||
|
||||
if (terminal.cwd().length>1 && dir === ".."){
|
||||
terminal.setcwd(evaledDir);
|
||||
return;
|
||||
}
|
||||
|
||||
const server = player.getCurrentServer();
|
||||
if (!containsFiles(server, evaledDir)) {
|
||||
terminal.error("Invalid path. Failed to change directories");
|
||||
|
||||
Reference in New Issue
Block a user