浏览代码

Try harder removing the temp file

Audrius Butkevicius 10 年之前
父节点
当前提交
42acf0ed60
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/model/rwfolder.go

+ 1 - 1
lib/model/rwfolder.go

@@ -1015,7 +1015,7 @@ func (p *rwFolder) handleFile(file protocol.FileInfo, copyChan chan<- copyBlocks
 			// Otherwise, discard the file ourselves in order for the
 			// sharedpuller not to panic when it fails to exclusively create a
 			// file which already exists
-			os.Remove(tempName)
+			osutil.InWritableDir(osutil.Remove, tempName)
 		}
 	} else {
 		blocks = file.Blocks