Skip to content

Commit

Permalink
Put cache.bolt in config path by default (#359)
Browse files Browse the repository at this point in the history
Many users change the config path to run multiple copies of plexdrive,
but forget to also set the cache file path, which results in corruption
of the cache.bolt database. This changes the default for the cache file,
so it is located in the config path unless otherwise specified.
  • Loading branch information
felixbuenemann committed Sep 6, 2020
1 parent 8658cf7 commit 03a3639
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can use [this tutorial](TUTORIAL.md) for instruction how to mount an encrypt
```
Usage of ./plexdrive mount:
--cache-file string
Path the the cache file (default "~/.plexdrive/cache.bolt")
Path of the cache file (default "~/.plexdrive/cache.bolt")
--chunk-check-threads int
The number of threads to use for checking chunk existence (default 2)
--chunk-load-ahead int
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func main() {
argRootNodeID := flag.String("root-node-id", "root", "The ID of the root node to mount (use this for only mount a sub directory)")
argDriveID := flag.String("drive-id", "", "The ID of the shared drive to mount (including team drives)")
argConfigPath := flag.StringP("config", "c", filepath.Join(home, ".plexdrive"), "The path to the configuration directory")
argCacheFile := flag.String("cache-file", filepath.Join(home, ".plexdrive", "cache.bolt"), "Path the the cache file")
argCacheFile := flag.String("cache-file", filepath.Join(*argConfigPath, "cache.bolt"), "Path of the cache file")
argChunkSize := flag.String("chunk-size", "10M", "The size of each chunk that is downloaded (units: B, K, M, G)")
argChunkLoadThreads := flag.Int("chunk-load-threads", max(runtime.NumCPU()/2, 1), "The number of threads to use for downloading chunks")
argChunkCheckThreads := flag.Int("chunk-check-threads", max(runtime.NumCPU()/2, 1), "The number of threads to use for checking chunk existence")
Expand Down

0 comments on commit 03a3639

Please sign in to comment.