Skip to content

Commit

Permalink
Use os.PathSeparator instead of "/", Resolves #1
Browse files Browse the repository at this point in the history
  • Loading branch information
aerth committed May 15, 2017
1 parent 7072452 commit f1d6773
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 @@ -370,7 +370,7 @@ func fileisgood(abs string) bool {
func prepareDirectory(dir string) string {
// add slash to dot
if dir == "." {
dir += "/"
dir += string(os.PathSeparator)
}

// become absolute
Expand All @@ -383,8 +383,8 @@ func prepareDirectory(dir string) string {
}

// add trailing slash (for comparing prefix)
if !strings.HasSuffix(dir, "/") {
dir += "/"
if !strings.HasSuffix(dir, string(os.PathSeparator)) {
dir += string(os.PathSeparator)
}

return dir
Expand Down

0 comments on commit f1d6773

Please sign in to comment.