Skip to content

Commit

Permalink
Use filepath.IsAbs to see if temp directory is local. Fixes a problem…
Browse files Browse the repository at this point in the history
… on Windows, since the old code assumed a rooted path starts with /.
  • Loading branch information
robpike committed Jul 17, 2013
1 parent 2b6b498 commit 496d3b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion glog_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"os"
"os/user"
"path"
"path/filepath"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -55,7 +56,7 @@ func createLogDirs() {
if len(dir) == 0 {
continue
}
if dir[0] != '/' {
if !filepath.IsAbs(dir) {
dir = "/" + dir
}
logDirs = append(logDirs, dir)
Expand Down

0 comments on commit 496d3b7

Please sign in to comment.