mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Photos: Refactor link from the Files tab to the file folder #2926
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -22,7 +22,7 @@ func Path(s string) string {
|
||||
}
|
||||
|
||||
switch r {
|
||||
case '~', '\\', ':', '|', '"', '?', '*', '<', '>', '{', '}':
|
||||
case '~', '\\', '|', '"', '?', '*', '<', '>', '{', '}':
|
||||
return -1
|
||||
default:
|
||||
return r
|
||||
@@ -38,7 +38,7 @@ func UserPath(dir string) string {
|
||||
return dir
|
||||
}
|
||||
|
||||
dir = strings.Trim(path.Clean(Path(strings.ReplaceAll(dir, "\\", "/"))), "./ \\*%#~?|<>:")
|
||||
dir = strings.Trim(path.Clean(Path(strings.ReplaceAll(dir, "\\", "/"))), "./ \\*%#~?|<>")
|
||||
|
||||
if strings.Contains(dir, "/.") || strings.Contains(dir, "..") || strings.Contains(dir, "//") {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user