Skip to content

Commit

Permalink
mkdir for nested dir
Browse files Browse the repository at this point in the history
  • Loading branch information
samiemostafavi committed Jul 26, 2023
1 parent 50f56c9 commit 213aa1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion irtt_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func runClientCLI(args []string) {
_, err := os.Stat(*outputDirStr)
if os.IsNotExist(err) {
// Directory does not exist, so create it
err := os.Mkdir(*outputDirStr, 0755) // 0755 is the default permission for the directory
err := os.MkdirAll(*outputDirStr, os.ModePerm)
if err != nil {
fmt.Println("Error creating output directory:", err)
return
Expand Down
2 changes: 1 addition & 1 deletion irtt_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func runServerCLI(args []string) {
_, err = os.Stat(*outputDirStr)
if os.IsNotExist(err) {
// Directory does not exist, so create it
err := os.Mkdir(*outputDirStr, 0755) // 0755 is the default permission for the directory
err := os.MkdirAll(*outputDirStr, os.ModePerm)
if err != nil {
fmt.Println("Error creating output directory:", err)
return
Expand Down

0 comments on commit 213aa1b

Please sign in to comment.