Skip to content

Commit

Permalink
- distinguish base path for repo path for sym-links
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Hoffmann <[email protected]>
  • Loading branch information
maho7791 committed Dec 23, 2023
1 parent 689630e commit 7269f17
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.util.ArrayList;
Expand Down Expand Up @@ -235,6 +236,9 @@ private synchronized void generateIndex(File indexFile, IRepositoryContentProvid
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
URI rootUri = storageDir.getCanonicalFile()
.toURI();
if (Files.isSymbolicLink(storageDir.toPath())) {
rootUri = storageDir.toURI();
}
provider.generateIndex(allFiles, out, this.getName(), rootUri, pretty, registry, logService);

byte[] data = out.toByteArray();
Expand Down

0 comments on commit 7269f17

Please sign in to comment.