Fix filename.

This commit is contained in:
Nuno Cruces 2023-04-22 10:40:23 +01:00
parent 723cb6bdb6
commit ee60339b2d

View File

@ -334,6 +334,9 @@ func splitDirAndName(path string) (dir, name string, err error) {
return path, "", nil return path, "", nil
} }
dir, name = filepath.Split(path) dir, name = filepath.Split(path)
if dir == "" {
return "", name, nil
}
_, err = os.Stat(dir) _, err = os.Stat(dir)
return dir, name, err return dir, name, err
} }