mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Handle file rescan (#2951)
* Fire handlers when file updated or moved * Create galleries as needed * Clean empty galleries * Handle cleaning zip folders when path changed * Fix gallery association on duplicate images * Re-create missing folder-based galleries
This commit is contained in:
@@ -34,6 +34,17 @@ func IsPathInDir(dir, pathToCheck string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsPathInDirs returns true if pathToCheck is within anys of the paths in dirs.
|
||||
func IsPathInDirs(dirs []string, pathToCheck string) bool {
|
||||
for _, dir := range dirs {
|
||||
if IsPathInDir(dir, pathToCheck) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// GetHomeDirectory returns the path of the user's home directory. ~ on Unix and C:\Users\UserName on Windows
|
||||
func GetHomeDirectory() string {
|
||||
currentUser, err := user.Current()
|
||||
|
||||
Reference in New Issue
Block a user