Skip to content

Commit

Permalink
Merge pull request #5944 from maho7791/master
Browse files Browse the repository at this point in the history
#5890 distinguish base path for repo path for sym-links
  • Loading branch information
pkriens authored Dec 24, 2023
2 parents 689630e + 7269f17 commit f57fdf7
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 f57fdf7

Please sign in to comment.