mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-27 06:20:02 +00:00
Adding myself and fixing Windows Tests.
This commit is contained in:
1 parent
34092da6be
commit
fe684083e7
50 files changed
+291
-112
No files matched your search
@@ -2152,7 +2152,12 @@ public final class DatapackIngestService {
|
||||
if (fileKey != null) {
|
||||
return "key:" + fileKey;
|
||||
}
|
||||
return "";
|
||||
// Windows exposes no inode-equivalent for a directory, and returning nothing here fails
|
||||
// the identity gate closed, which disables legacy staging replacement on that platform
|
||||
// outright. Creation time is the one stable discriminator the filesystem still offers: a
|
||||
// directory swapped in at the same path brings its own, so a swap is still caught. It is
|
||||
// a weaker guarantee than an inode, so it is only ever the fallback.
|
||||
return "created:" + attributes.creationTime();
|
||||
}
|
||||
|
||||
private static boolean pathExists(Path path, String purpose) throws IOException {
|
||||
|
||||
@@ -374,6 +374,12 @@ final class JigsawStudioHistoryStore {
|
||||
}
|
||||
|
||||
private static void forceDirectory(Path directory) throws IOException {
|
||||
// A directory can only be opened and fsynced on a POSIX filesystem; Windows rejects the
|
||||
// open outright. Matches DirectoryDurability and DatapackIngestService, which already
|
||||
// skip the barrier there.
|
||||
if (!Files.getFileStore(directory).supportsFileAttributeView("posix")) {
|
||||
return;
|
||||
}
|
||||
try (FileChannel channel = FileChannel.open(directory, StandardOpenOption.READ)) {
|
||||
channel.force(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user