Use more readable variable name

This commit is contained in:
Mygod
2017-03-01 17:25:23 +08:00
parent 0ee7e9d40e
commit b6667b9e0f
@@ -197,14 +197,14 @@ class ShadowsocksApplication extends Application {
def copyAssets() {
val assetManager = getAssets
for (f <- List("acl", "overture")) {
for (dir <- List("acl", "overture")) {
var files: Array[String] = null
try files = assetManager.list(f) catch {
try files = assetManager.list(dir) catch {
case e: IOException =>
Log.e(TAG, e.getMessage)
app.track(e)
}
if (files != null) for (file <- files) autoClose(assetManager.open(f + "/" + file))(in =>
if (files != null) for (file <- files) autoClose(assetManager.open(dir + "/" + file))(in =>
autoClose(new FileOutputStream(new File(getFilesDir, file)))(out =>
IOUtils.copy(in, out)))
}