mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Index: Check if the originals folder is empty before indexing #2299
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -84,7 +84,7 @@ func StartImport(router *gin.RouterGroup) {
|
||||
|
||||
imp.Start(opt)
|
||||
|
||||
if subPath != "" && path != conf.ImportPath() && fs.IsEmpty(path) {
|
||||
if subPath != "" && path != conf.ImportPath() && fs.DirIsEmpty(path) {
|
||||
if err := os.Remove(path); err != nil {
|
||||
log.Errorf("import: failed deleting empty folder %s: %s", clean.Log(path), err)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user