From 9e5b2dad466bf52632013aac4c529a9618d290bd Mon Sep 17 00:00:00 2001 From: r-ca Date: Tue, 9 Jan 2024 12:24:56 +0900 Subject: [PATCH] =?UTF-8?q?=E8=AA=AD=E3=81=BF=E6=9B=B8=E3=81=8D=E3=81=AE?= =?UTF-8?q?=E7=A2=BA=E8=AA=8D=E3=81=AE=E5=89=8D=E3=81=AB=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=AE=E5=AD=98=E5=9C=A8=E3=82=92=E7=A2=BA?= =?UTF-8?q?=E8=AA=8D=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/file/impl/FileManagerImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index db47d158..5d5eeb8b 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -88,14 +88,22 @@ public class FileManagerImpl implements FileManager { @Override public boolean isReadable() { - File file = this.path.toFile(); - return file.canRead(); + if (this.isExist()) { + File file = this.path.toFile(); + return file.canRead(); + } else { + return false; + } } @Override public boolean isWritable() { - File file = this.path.toFile(); - return file.canWrite(); + if (this.isExist()) { + File file = this.path.toFile(); + return file.canWrite(); + } else { + return false; + } } @Override