Skip to content

Commit

Permalink
cmd: don't preserve parent directories for --bundle, see #671
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Feb 16, 2024
1 parent 6b9175d commit c754bf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/minify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,10 +1027,14 @@ Next:
}
}

// when using --bundle there are no directories to preserve
if 1 < len(srcs) {
return
}

dst = filepath.Dir(dst)
if srcs[0] = filepath.Dir(srcs[0]); srcs[0] != "." {
// go up to but excluding the root path
srcs = srcs[:1] // use first file to set permissions on parent directories
goto Next
}
}
Expand Down

0 comments on commit c754bf5

Please sign in to comment.