From 9d40c78c3a0f8d910e9a44545916b75d4925f5d1 Mon Sep 17 00:00:00 2001 From: Cameron Arshadi Date: Tue, 20 Aug 2024 12:08:51 -0400 Subject: [PATCH] Fix SWC saving --- src/main/java/sc/fiji/snt/Tree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/sc/fiji/snt/Tree.java b/src/main/java/sc/fiji/snt/Tree.java index 1fab8133..ef41f965 100644 --- a/src/main/java/sc/fiji/snt/Tree.java +++ b/src/main/java/sc/fiji/snt/Tree.java @@ -1683,7 +1683,7 @@ private static File getFile(final String filename, final boolean checkIfAvailabl f = new File(filename.replaceFirst("^~", System.getProperty("user.home"))); else f = new File(filename); - if (!SNTUtils.fileAvailable(f)) + if (checkIfAvailable && !SNTUtils.fileAvailable(f)) throw new IllegalArgumentException("File is not available: " + filename); return f; }