mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 18:48:33 -04:00
fix: Handled mk_dir error.
This commit is contained in:
@@ -42,7 +42,10 @@ cmd_restore :: proc(cmd: ^Command) {
|
||||
}
|
||||
|
||||
dir := filepath.dir(file.Path)
|
||||
os.mkdir_all(dir)
|
||||
if err := os.mkdir_all(dir); err != nil {
|
||||
fmt.wprintf(cmd.err, "failed to create directory: %s\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
write_err := os.write_entire_file(file.Path, file.contents)
|
||||
if write_err != nil {
|
||||
|
||||
Reference in New Issue
Block a user