mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-11-07 15:19:44 +00:00
Return directly if name does not exist
This commit is contained in:
parent
7dedbafc8a
commit
15ec0597ea
@ -581,7 +581,7 @@ func ReadLine(lineNumber int, path string) string {
|
|||||||
func NameAccumulation(name string, dir string) string {
|
func NameAccumulation(name string, dir string) string {
|
||||||
path := filepath.Join(dir, name)
|
path := filepath.Join(dir, name)
|
||||||
if _, err := os.Stat(path); os.IsNotExist(err) {
|
if _, err := os.Stat(path); os.IsNotExist(err) {
|
||||||
return path
|
return name
|
||||||
}
|
}
|
||||||
base := name
|
base := name
|
||||||
strings.Split(base, "_")
|
strings.Split(base, "_")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user