Skip to content

Commit

Permalink
No need to normalize levels above Deepbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylangisc committed Nov 28, 2024
1 parent f37891e commit 49482b2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ public boolean isContainer(final Path file) {
}

public boolean isCompany(final Path file) {
final Path normalized = fileid.normalize(file);
if(normalized.isRoot()) {
if(file.isRoot()) {
return false;
}
return normalized.isDirectory() && normalized.getParent().isRoot();
return file.isDirectory() && file.getParent().isRoot();
}

public boolean isSharedWithMe(final Path file) {
Expand Down Expand Up @@ -214,7 +213,7 @@ protected Path getDeepboxPath(final Path file) {
}

protected Path getCompanyPath(final Path file) {
Path company = fileid.normalize(file);
Path company = file;
while(!company.isRoot() && !this.isCompany(company)) {
company = company.getParent();
}
Expand Down

0 comments on commit 49482b2

Please sign in to comment.