File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,8 +46,18 @@ public DexFactory(Context context)
4646 this .proxyGenerator = new ProxyGenerator (dexPath );
4747 ProxyGenerator .IsLogEnabled = Platform .IsLogEnabled ;
4848
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+ }
5161
5262 this .updateDexThumbAndPurgeCache ();
5363 this .proxyGenerator .setProxyThumb (this .dexThumb );
@@ -296,9 +306,15 @@ private String generateDexThumb()
296306
297307 private void purgeDexesByThumb (String cachedDexThumb , File pathToPurge )
298308 {
299- if (!pathToPurge .isDirectory ())
309+ if (!pathToPurge .exists ())
310+ {
311+ return ;
312+ }
313+
314+ if (!pathToPurge .isDirectory ())
300315 {
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" );
302318 }
303319
304320 String [] children = pathToPurge .list ();
You can’t perform that action at this time.
0 commit comments