Skip to content

Commit

Permalink
don't chdir if no working output dir specified
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitchellXOR committed Jul 1, 2016
1 parent 82f078f commit 023b169
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/xor/cmd/idfactor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ func main() {
}

// change to output directory and write output
if err := os.Chdir(dir); err != nil {
log.Fatalf(`error setting working directory to "%s":`, err)
if dir != "" {
if err := os.Chdir(dir); err != nil {
log.Fatalf(`error setting working directory to "%s":`, err)
}
}
ids, err := factor(records)
if err != nil {
Expand Down

0 comments on commit 023b169

Please sign in to comment.