Skip to content

Commit

Permalink
Use os.TempDir() to determine temporary directory.
Browse files Browse the repository at this point in the history
This allows overrides through environment variable $TMPDIR.
  • Loading branch information
hanwen committed Feb 21, 2013
1 parent cb86654 commit f0d8d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/classic.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (fs *DeviceFs) ensureFreeSpace(want int64) error {
func (fs *DeviceFs) setupClassic() error {
if fs.options.Dir == "" {
var err error
fs.options.Dir, err = ioutil.TempDir("", "go-mtpfs")
fs.options.Dir, err = ioutil.TempDir(os.TempDir(), "go-mtpfs")
if err != nil {
return err
}
Expand Down

0 comments on commit f0d8d53

Please sign in to comment.