File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,18 @@ public DexFactory(Context context)
46
46
this .proxyGenerator = new ProxyGenerator (dexPath );
47
47
ProxyGenerator .IsLogEnabled = Platform .IsLogEnabled ;
48
48
49
- File odexDir = new File (this .odexPath );
50
- odexDir .mkdirs ();
49
+ File dexDir = new File (dexPath );
50
+
51
+ if (!dexDir .exists ())
52
+ {
53
+ dexDir .mkdirs ();
54
+ }
55
+
56
+ File odexDir = new File (odexPath );
57
+ if (!odexDir .exists ())
58
+ {
59
+ odexDir .mkdir ();
60
+ }
51
61
52
62
this .updateDexThumbAndPurgeCache ();
53
63
this .proxyGenerator .setProxyThumb (this .dexThumb );
@@ -296,9 +306,15 @@ private String generateDexThumb()
296
306
297
307
private void purgeDexesByThumb (String cachedDexThumb , File pathToPurge )
298
308
{
299
- if (!pathToPurge .isDirectory ())
309
+ if (!pathToPurge .exists ())
310
+ {
311
+ return ;
312
+ }
313
+
314
+ if (!pathToPurge .isDirectory ())
300
315
{
301
- throw new RuntimeException ("Purge path not a directory" );
316
+ Log .e (Platform .DEFAULT_LOG_TAG , "Purge proxies path not a directory. Path: " + pathToPurge );
317
+ throw new RuntimeException ("Purge path not a directory" );
302
318
}
303
319
304
320
String [] children = pathToPurge .list ();
You can’t perform that action at this time.
0 commit comments