Commit b6667b9e authored by Mygod's avatar Mygod

Use more readable variable name

parent 0ee7e9d4
......@@ -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)))
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment