Skip to content
Snippets Groups Projects
Commit b089fae0 authored by User expired's avatar User expired
Browse files

Merge remote-tracking branch 'upstream/OpenOLAT_14.0' into OpenOLAT_14.0.uibk

parents 8c1c3e94 0935a6f9
No related branches found
No related tags found
No related merge requests found
......@@ -1087,18 +1087,18 @@ public class VFSRepositoryServiceImpl implements VFSRepositoryService, GenericEv
if(directory.isHidden() || VFSRepositoryModule.canMeta(directory) != VFSConstants.YES) {
return FileVisitResult.SKIP_SUBTREE;
}
if(dir.getNameCount() > 50) {
if(dir.getNameCount() > 50 || parentLine.size() > 50) {
log.error("More than 50 directories deep. Stop migrating metadata: {}", directory);
return FileVisitResult.SKIP_SUBTREE;
}
VFSMetadata parent = parentLine.peekLast();
VFSMetadata metadata = migrateMetadata(dir.toFile(), parent);
parentLine.add(metadata);
if(metadata != null && "migrated".equals(metadata.getMigrated())) {
dbInstance.commitAndCloseSession();
return FileVisitResult.SKIP_SUBTREE;
}
parentLine.add(metadata);
dbInstance.commit();
return FileVisitResult.CONTINUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment