From 9a6bc0a165d8d7a851fabdd05a67b27482afc801 Mon Sep 17 00:00:00 2001 From: Jim Westfall Date: Wed, 22 Oct 2014 17:56:46 -0700 Subject: [PATCH] Don't attempt to read Length/LastWriteTimeUtc if the file/dir doesn't exist --- ROMVault2/IO/RVIO.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ROMVault2/IO/RVIO.cs b/ROMVault2/IO/RVIO.cs index c7fc15e..6361ce1 100644 --- a/ROMVault2/IO/RVIO.cs +++ b/ROMVault2/IO/RVIO.cs @@ -60,6 +60,9 @@ namespace ROMVault2.IO if (Settings.MonoFileIO) { System.IO.FileInfo fi = new System.IO.FileInfo(path); + + if(!fi.Exists) return; + Length = fi.Length; LastWriteTime = fi.LastWriteTimeUtc.Ticks; return; @@ -94,6 +97,9 @@ namespace ROMVault2.IO if (Settings.MonoFileIO) { System.IO.DirectoryInfo fi = new System.IO.DirectoryInfo(path); + + if(!fi.Exists) return; + LastWriteTime = fi.LastWriteTimeUtc.Ticks; return; }