]> 127.0.0.1 Git - part/.git/commitdiff
1 v0.28.20250225073648
authorqydysky <qydysky@foxmail.com>
Tue, 25 Feb 2025 07:36:21 +0000 (07:36 +0000)
committerGitHub <noreply@github.com>
Tue, 25 Feb 2025 07:36:21 +0000 (07:36 +0000)
file/FileWR.go

index f3942131151b157506bf1a24c27047096f71c801..9afe1c5d9799d2b1da6d16674328c1892a388a71 100644 (file)
@@ -855,7 +855,11 @@ func (t *File) newPath(path string, mode fs.FileMode) {
                if n == len(rawPs)-1 {
                        break
                }
-               rawPath += string(os.PathSeparator) + p
+
+               if rawPath != "" {
+                       rawPath += string(os.PathSeparator)
+               }
+               rawPath += p
 
                fos, e := t.getOs()
                if e != nil {