Permalink
Browse files

Use os.TempDir() to determine temporary directory.

This allows overrides through environment variable $TMPDIR.
  • Loading branch information...
1 parent cb86654 commit f0d8d537d07905b7b160b7af65e286b68d22cc91 @hanwen committed Feb 21, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 fs/classic.go
View
2 fs/classic.go
@@ -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
}

0 comments on commit f0d8d53

Please sign in to comment.