use os.TempDir() for portable temporary directory

This commit is contained in:
David Christofas
2020-03-11 15:58:40 +01:00
parent 016471532a
commit f5f68e27dc

View File

@@ -1,6 +1,9 @@
package flagset
import (
"os"
"path"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-thumbnails/pkg/config"
)
@@ -136,7 +139,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "filesystemstorage-root",
Value: "/tmp/ocis-thumbnails/",
Value: path.Join(os.TempDir(), "ocis-thumbnails/"),
Usage: "Root path of the filesystem storage directory",
EnvVars: []string{"THUMBNAILS_FILESYSTEMSTORAGE_ROOT"},
Destination: &cfg.FileSystemStorage.RootDirectory,