Commit 5b0ae109 authored by Johannes Schriewer's avatar Johannes Schriewer

Bugfix: Only try to remove a dir if it is really there

parent 84d52ae1
Pipeline #1667 failed with stage
...@@ -58,7 +58,9 @@ func userPath() -> Path { ...@@ -58,7 +58,9 @@ func userPath() -> Path {
do { do {
let userPath = try FS.getWorkingDirectory().appending("user") let userPath = try FS.getWorkingDirectory().appending("user")
if !userPathCreated { if !userPathCreated {
let _ = try FS.removeItem(path: userPath, recursive: true) if FS.isDirectory(path: userPath) {
try FS.removeItem(path: userPath, recursive: true)
}
try FS.createDirectory(path: userPath) try FS.createDirectory(path: userPath)
userPathCreated = true userPathCreated = true
} }
......
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