mirror of
https://github.com/rastapasta/mapscii.git
synced 2025-08-09 22:07:43 +02:00
Merge pull request #57 from rastapasta/create-folder-error
Throw an error if creating a folder fails.
This commit is contained in:
@ -168,7 +168,8 @@ class TileSource {
|
||||
fs.mkdirSync(path);
|
||||
return true;
|
||||
} catch (error) {
|
||||
return error.code === 'EEXIST';
|
||||
if (error.code === 'EEXIST') return true;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user