Remove hooks for internal repository id

This commit is contained in:
René Pfeuffer
2018-11-23 16:12:35 +01:00
parent 1a9c3a1a6c
commit c8fc673ce0
10 changed files with 44 additions and 52 deletions

View File

@@ -184,10 +184,10 @@ public class XmlRepositoryDAO
}
@Override
public String getIdForDirectory(File path) {
public Repository getRepositoryForDirectory(File path) {
for (RepositoryPath p : db.getPaths()) {
if (toRealPath(path.toPath()).startsWith(toRealPath(context.getBaseDirectory().toPath().resolve(p.getPath())))) {
return p.getId();
return p.getRepository();
}
}
throw new NotFoundException("directory", path.getPath());