Переглянути джерело

[annex] Repeated web upload for annexed file

annexed files, on clone, are dangling symlinks which need to be removed before we can write to them again.
cgars 7 роки тому
батько
коміт
d3279c4da8
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      models/repo_editor.go

+ 2 - 0
models/repo_editor.go

@@ -527,6 +527,8 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
 		if !com.IsFile(tmpPath) {
 			continue
 		}
+		// needed for annex, due to symlinks
+		os.Remove(targetPath)
 		if err = com.Copy(tmpPath, targetPath); err != nil {
 			return fmt.Errorf("copy: %v", err)
 		}