Skip to content

Commit

Permalink
Fix a small bug related to create folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Gh0u1L5 authored and Gh0u1L5 committed Oct 2, 2017
1 parent ab175ca commit 601ae6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gh0u1l5.wechatmagician"
android:versionCode="19"
android:versionName="2.2.0">
android:versionCode="20"
android:versionName="2.2.1">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Expand Down
4 changes: 3 additions & 1 deletion src/main/kotlin/com/gh0u1l5/wechatmagician/util/ImageUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ object ImageUtil {
val encEngine = newInstance(WechatPackage.EncEngine, media.key)
callMethod(encEngine, WechatPackage.EncEngineEDMethod, content, content.size)

val out = FileOutputStream(path)
val file = File(path)
file.parentFile.mkdirs()
val out = FileOutputStream(file)
out.write(content)
out.close()
}
Expand Down

0 comments on commit 601ae6a

Please sign in to comment.