Handle broken symlinks, Simple versioner (fixes #1071)

This commit is contained in:
Jakob Borg 2014-12-03 11:42:22 +01:00
parent 3e26fdfb67
commit d38c81fcff

View File

@ -55,7 +55,7 @@ func NewSimple(folderID, folderPath string, params map[string]string) Versioner
// Move away the named file to a version archive. If this function returns
// nil, the named file does not exist any more (has been archived).
func (v Simple) Archive(filePath string) error {
fileInfo, err := os.Stat(filePath)
fileInfo, err := os.Lstat(filePath)
if err != nil {
if os.IsNotExist(err) {
if debug {