diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BRouterActivity.java b/brouter-routing-app/src/main/java/btools/routingapp/BRouterActivity.java index 6358fdd..1e358c6 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BRouterActivity.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BRouterActivity.java @@ -331,12 +331,16 @@ public class BRouterActivity extends Activity implements OnInitListener { ArrayList dirFreeSizes = new ArrayList(); for( String d : items ) { + try + { StatFs stat = new StatFs(d); long size = (long)stat.getAvailableBlocks()*stat.getBlockSize(); int idx = 0; while ( idx < availableBasedirs.size() && dirFreeSizes.get(idx).longValue() > size ) idx++; availableBasedirs.add( idx, d ); dirFreeSizes.add( idx, Long.valueOf( size ) ); + } + catch( Exception e ) { /* ignore */ } } basedirOptions= new String[items.size() + 1]; diff --git a/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java b/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java index ab82c32..b7014e1 100644 --- a/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java +++ b/brouter-routing-app/src/main/java/btools/routingapp/BRouterView.java @@ -794,7 +794,7 @@ private long startTime = 0L; if ( line.contains( "/dev/block/vold" ) ) { isExternalDir = true; - String[] vetos = new String[] { "/mnt/secure", "/mnt/asec", "/mnt/obb", "/dev/mapper", "tmpfs" }; + String[] vetos = new String[] { "/mnt/secure", "/mnt/asec", "/mnt/obb", "/dev/mapper", "tmpfs", "/mnt/media_rw" }; for( String v: vetos ) { if ( d.indexOf( v ) >= 0 )