Skip to content

Commit

Permalink
Incorporate review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ties committed Dec 8, 2023
1 parent 2a3ec9a commit a8ea871
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/ripe/rpki/rsyncit/rsync/RsyncWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private Path writeObjectToNewDirectory(List<RpkiObject> objects, Instant now) th
hostName);
});

// Calculate target directory after writing phase, to be sure it is not used beforehand.
// Init target directory variable after writing phase, to be sure can not be used in another scope.
final Path targetDirectory = generatePublicationDirectoryPath(config.rsyncPath(), now);

// Directory write is fully complete, rename temporary to target directory name
Expand Down Expand Up @@ -189,7 +189,7 @@ void cleanupOldTargetDirectories(Instant now, Path baseDirectory) throws IOExcep
long cutoff = now.toEpochMilli() - config.targetDirectoryRetentionPeriodMs();

// resolve the published symlink - because we definitely want to keep that copy.
// TODO: published dir should be built without string concat, but this is where we are ¯\_(ツ)_/¯
// TODO: published dir should be a config attribute instead of relative resolve w/ string, but this is where we are ¯\_(ツ)_/¯
var actualPublishedDir = config.rsyncPath().resolve("published").toRealPath();

try (
Expand Down

0 comments on commit a8ea871

Please sign in to comment.