aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2014-06-13 15:39:18 -0700
committerdaneren2005 <daneren2005@gmail.com>2014-06-13 15:39:18 -0700
commit8dc6eab370c4c3c1f31ed86f2e784ae74c7ebe7d (patch)
treebaa0186c1469e9f2c321ee4f9d31bbdccc5e1fb8 /src/github
parent4af6a67afce31f312357e809e50f6c14f709157c (diff)
downloaddsub-8dc6eab370c4c3c1f31ed86f2e784ae74c7ebe7d.tar.gz
dsub-8dc6eab370c4c3c1f31ed86f2e784ae74c7ebe7d.tar.bz2
dsub-8dc6eab370c4c3c1f31ed86f2e784ae74c7ebe7d.zip
Doing a exists check first is faster then deserializing
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/util/FileUtil.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java
index e84f6eb2..a73d9718 100644
--- a/src/github/daneren2005/dsub/util/FileUtil.java
+++ b/src/github/daneren2005/dsub/util/FileUtil.java
@@ -585,6 +585,9 @@ public class FileUtil {
Input in = null;
try {
File file = new File(context.getCacheDir(), fileName);
+ if(!file.exists()) {
+ return null;
+ }
if(hoursOld != 0) {
Date fileDate = new Date(file.lastModified());