mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Don't delete downloads directory at startup if generated not set (#1098)
* Don't empty directories if generated not set * Rename downloads to download_stage
This commit is contained in:
@@ -67,8 +67,11 @@ func Initialize() *singleton {
|
|||||||
instance.RefreshConfig()
|
instance.RefreshConfig()
|
||||||
|
|
||||||
// clear the downloads and tmp directories
|
// clear the downloads and tmp directories
|
||||||
|
// #1021 - only clear these directories if the generated folder is non-empty
|
||||||
|
if config.GetGeneratedPath() != "" {
|
||||||
utils.EmptyDir(instance.Paths.Generated.Downloads)
|
utils.EmptyDir(instance.Paths.Generated.Downloads)
|
||||||
utils.EmptyDir(instance.Paths.Generated.Tmp)
|
utils.EmptyDir(instance.Paths.Generated.Tmp)
|
||||||
|
}
|
||||||
|
|
||||||
initFFMPEG()
|
initFFMPEG()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ func newGeneratedPaths() *generatedPaths {
|
|||||||
gp.Vtt = filepath.Join(config.GetGeneratedPath(), "vtt")
|
gp.Vtt = filepath.Join(config.GetGeneratedPath(), "vtt")
|
||||||
gp.Markers = filepath.Join(config.GetGeneratedPath(), "markers")
|
gp.Markers = filepath.Join(config.GetGeneratedPath(), "markers")
|
||||||
gp.Transcodes = filepath.Join(config.GetGeneratedPath(), "transcodes")
|
gp.Transcodes = filepath.Join(config.GetGeneratedPath(), "transcodes")
|
||||||
gp.Downloads = filepath.Join(config.GetGeneratedPath(), "downloads")
|
gp.Downloads = filepath.Join(config.GetGeneratedPath(), "download_stage")
|
||||||
gp.Tmp = filepath.Join(config.GetGeneratedPath(), "tmp")
|
gp.Tmp = filepath.Join(config.GetGeneratedPath(), "tmp")
|
||||||
return &gp
|
return &gp
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
* Support configurable number of threads for scanning and generation.
|
* Support configurable number of threads for scanning and generation.
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 Bug fixes
|
||||||
|
* Fixed stash potentially deleting `downloads` directory when first run.
|
||||||
* Fix sprite generation when generated path has special characters.
|
* Fix sprite generation when generated path has special characters.
|
||||||
* Prevent studio from being set as its own parent
|
* Prevent studio from being set as its own parent
|
||||||
* Fixed performer scraper select overlapping search results
|
* Fixed performer scraper select overlapping search results
|
||||||
|
|||||||
Reference in New Issue
Block a user