Loading src/main/java/org/torproject/metrics/collector/indexer/CreateIndexJson.java +8 −5 Original line number Diff line number Diff line Loading @@ -390,12 +390,15 @@ public class CreateIndexJson extends CollecTorMain { // Ensure lastModified is populated in FileNode if (fileNode != null && currentDirectoryPath != null) { if (fileNode.lastModified == null) { String lastModified = dateTimeFormatter.format( Files.getLastModifiedTime(Paths.get(fileNode.path)) .toInstant()); fileNode.lastModified = lastModified; Path filePath = indexedPath.resolve(fileNode.path); // Ensure full path if (Files.exists(filePath)) { fileNode.lastModified = dateTimeFormatter.format( Files.getLastModifiedTime(filePath).toInstant() ); } else { logger.warn("File does not exist: {}", filePath); } } Path directoryPath = Paths.get(currentDirectoryPath); Path filePath = this.indexedPath.resolve(directoryPath) .resolve(Paths.get(fileNode.path)); Loading Loading
src/main/java/org/torproject/metrics/collector/indexer/CreateIndexJson.java +8 −5 Original line number Diff line number Diff line Loading @@ -390,12 +390,15 @@ public class CreateIndexJson extends CollecTorMain { // Ensure lastModified is populated in FileNode if (fileNode != null && currentDirectoryPath != null) { if (fileNode.lastModified == null) { String lastModified = dateTimeFormatter.format( Files.getLastModifiedTime(Paths.get(fileNode.path)) .toInstant()); fileNode.lastModified = lastModified; Path filePath = indexedPath.resolve(fileNode.path); // Ensure full path if (Files.exists(filePath)) { fileNode.lastModified = dateTimeFormatter.format( Files.getLastModifiedTime(filePath).toInstant() ); } else { logger.warn("File does not exist: {}", filePath); } } Path directoryPath = Paths.get(currentDirectoryPath); Path filePath = this.indexedPath.resolve(directoryPath) .resolve(Paths.get(fileNode.path)); Loading