Skip to content

Commit

Permalink
change default path for thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Apr 6, 2021
1 parent 024b5f2 commit 925d916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions thumbnails/pkg/flagset/flagset.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package flagset

import (
"os"
"path/filepath"

"github.com/owncloud/ocis/ocis-pkg/flags"

"github.com/micro/cli/v2"
Expand Down Expand Up @@ -140,7 +137,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "filesystemstorage-root",
Value: flags.OverrideDefaultString(cfg.Thumbnail.FileSystemStorage.RootDirectory, filepath.Join(os.TempDir(), "ocis-thumbnails/")),
Value: "/var/tmp/ocis/thumbnails",
Usage: "Root path of the filesystem storage directory",
EnvVars: []string{"THUMBNAILS_FILESYSTEMSTORAGE_ROOT"},
Destination: &cfg.Thumbnail.FileSystemStorage.RootDirectory,
Expand Down
2 changes: 1 addition & 1 deletion thumbnails/pkg/thumbnail/storage/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (s *FileSystem) createUserDir(username string) (string, error) {
}

// linkImageToUserDir links the stored images to the user directory.
// The goal is to minimize disk usage by linking to the images if they already exist and avoid file duplicaiton.
// The goal is to minimize disk usage by linking to the images if they already exist and avoid file duplication.
func (s *FileSystem) linkImageToUserDir(key string, userDir string) error {
imgRootDir := s.rootDir(key)

Expand Down

0 comments on commit 925d916

Please sign in to comment.