fix upload file no permission error for sync #188

This commit is contained in:
xiaoyaofenfen 2022-11-14 10:26:31 +08:00
parent 9db89a64b0
commit 5f6cdcab64

View File

@ -364,6 +364,9 @@ func (f *FileActionTask) uploadFile(ctx context.Context) error {
err := localFile.OpenPath() err := localFile.OpenPath()
if err != nil { if err != nil {
logger.Verbosef("文件不可读 %s, 错误信息: %s\n", localFile.Path, err) logger.Verbosef("文件不可读 %s, 错误信息: %s\n", localFile.Path, err)
f.syncItem.Status = SyncFileStatusFailed
f.syncItem.StatusUpdateTime = utils.NowTimeStr()
f.syncFileDb.Update(f.syncItem)
return err return err
} }
defer localFile.Close() // 关闭文件 defer localFile.Close() // 关闭文件