浏览代码

Merge pull request #1951 from AudriusButkevicius/voodoo

Voodoo
Jakob Borg 10 年之前
父节点
当前提交
ad220d61f9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      internal/model/rwfolder.go

+ 2 - 2
internal/model/rwfolder.go

@@ -643,7 +643,7 @@ func (p *rwFolder) deleteDir(file protocol.FileInfo) {
 	if err == nil || os.IsNotExist(err) {
 		// It was removed or it doesn't exist to start with
 		p.dbUpdates <- file
-	} else if _, err := os.Lstat(realName); err != nil && !os.IsPermission(err) {
+	} else if _, serr := os.Lstat(realName); serr != nil && !os.IsPermission(serr) {
 		// We get an error just looking at the directory, and it's not a
 		// permission problem. Lets assume the error is in fact some variant
 		// of "file does not exist" (possibly expressed as some parent being a
@@ -691,7 +691,7 @@ func (p *rwFolder) deleteFile(file protocol.FileInfo) {
 	if err == nil || os.IsNotExist(err) {
 		// It was removed or it doesn't exist to start with
 		p.dbUpdates <- file
-	} else if _, err := os.Lstat(realName); err != nil && !os.IsPermission(err) {
+	} else if _, serr := os.Lstat(realName); serr != nil && !os.IsPermission(serr) {
 		// We get an error just looking at the file, and it's not a permission
 		// problem. Lets assume the error is in fact some variant of "file
 		// does not exist" (possibly expressed as some parent being a file and