From f06cdb6e3c81f8f44b408276c44cfc3965cfe3b7 Mon Sep 17 00:00:00 2001 From: IzzyBizzy Date: Fri, 10 Jun 2022 19:13:29 +1000 Subject: [PATCH] "TMP filesystem ({}) is read-only!" Fix TMP filesystem ({}) is read-only! was showing up when running on windows environment. May be wrong in removing the .resolve part, but found that Java was trying to locate a file that wasn't being created when the server/client was ran, resulting in the check failing. Removing the resolve still seems to pickup if a directory is read only so should be good still (hopefully lol) --- .../java/net/szum123321/textile_backup/core/Utilities.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/szum123321/textile_backup/core/Utilities.java b/src/main/java/net/szum123321/textile_backup/core/Utilities.java index 8a5d466..8a56b91 100644 --- a/src/main/java/net/szum123321/textile_backup/core/Utilities.java +++ b/src/main/java/net/szum123321/textile_backup/core/Utilities.java @@ -87,8 +87,8 @@ public class Utilities { log.error("Not enough space left in TMP directory! ({})", tmp_dir); flag = true; } - - if(!Files.isWritable(tmp_dir.resolve("test_txb_file_2137"))) { + //!Files.isWritable(tmp_dir.resolve("test_txb_file_2137")) - Unsure why this was resolving to a file that isn't being created (at least not in Windows) + if(!Files.isWritable(tmp_dir)) { log.error("TMP filesystem ({}) is read-only!", tmp_dir); flag = true; }