[BUGFIX] allow deletion folder with deleted references to files