sync: avoid depending on database when importing files

This commit is contained in:
nemunaire 2020-01-16 18:18:26 +01:00
parent 16c337c2bc
commit aee3500fdf

View File

@ -150,11 +150,6 @@ func ImportFile(i Importer, URI string, next func(string, string) (interface{},
}
}
// Ensure no more file is registered with this path
if f, err := fic.GetFileByPath(dest); err == nil {
f.Delete()
}
if err := os.MkdirAll(path.Dir(dest), 0755); err != nil {
return nil, err
}