diff options
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java index 3777e55c..831e3c5e 100644 --- a/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java +++ b/main/src/main/java/de/blinkt/openvpn/fragments/SendDumpFragment.java @@ -81,6 +81,9 @@ public class SendDumpFragment extends Fragment { long newestDumpTime=0; File newestDumpFile=null; + if (c.getCacheDir() ==null) + return null; + for(File f:c.getCacheDir().listFiles()) { if(!f.getName().endsWith(".dmp")) continue; @@ -91,8 +94,8 @@ public class SendDumpFragment extends Fragment { } } // Ignore old dumps - //if(System.currentTimeMillis() - 48 * 60 * 1000 > newestDumpTime ) - //return null; + if(System.currentTimeMillis() - 48 * 60 * 1000 > newestDumpTime ) + return null; return newestDumpFile; } |