Skip to content

Commit 869bdf1

Browse files
committed
fix(serverHandler): use strings.Replace instead of strings.ReplaceAll
Prevent using `strings.ReplaceAll` to make it possible to compile under Go 1.10. Thus, make it possible to build executable run under Windows XP.
1 parent 957beca commit 869bdf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/serverHandler/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (h *handler) saveUploadFiles(fsPrefix string, createDir, overwriteExists bo
5858
break
5959
}
6060

61-
partFilename := path.Clean(strings.ReplaceAll(part.FileName(), "\\", "/"))
61+
partFilename := path.Clean(strings.Replace(part.FileName(), "\\", "/", -1))
6262
if partFilename[0] == '/' {
6363
partFilename = partFilename[1:]
6464
}

0 commit comments

Comments
 (0)