mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
fix: cannot upload file to onedrive because file info not match (fix #1215)
Path in onedrive is not case-sensitive while Cloudreve cares, thus file size is not matching when finishing upload.
This commit is contained in:
@@ -179,7 +179,7 @@ func (service *OneDriveCallback) PreProcess(c *gin.Context) serializer.Response
|
||||
isSizeCheckFailed = false
|
||||
}
|
||||
|
||||
if isSizeCheckFailed || info.GetSourcePath() != actualPath {
|
||||
if isSizeCheckFailed || !strings.EqualFold(info.GetSourcePath(), actualPath) {
|
||||
fs.Handler.(onedrive.Driver).Client.Delete(context.Background(), []string{info.GetSourcePath()})
|
||||
return serializer.Err(serializer.CodeUploadFailed, "文件信息不一致", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user