Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
kazhuravlev authored and avelino committed Apr 3, 2023
1 parent 944256f commit 5976b31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ func dropCreateDir(dir string) error {

func mkdirAll(path string) error {
_, err := os.Stat(path)
// NOTE: directory is exists
// directory is exists
if err == nil {
return nil
}

// NOTE: unknown error
// unexpected error
if !os.IsNotExist(err) {
return fmt.Errorf("unexpected result of dir stat: %w", err)
}

// NOTE: directory is not exists
// directory is not exists
if err := os.MkdirAll(path, 0755); err != nil {
return fmt.Errorf("midirAll: %w", err)
}
Expand Down

0 comments on commit 5976b31

Please sign in to comment.