Skip to content

Commit 601ae6a

Browse files
Gh0u1L5Gh0u1L5
Gh0u1L5
authored and
Gh0u1L5
committed
Fix a small bug related to create folders
1 parent ab175ca commit 601ae6a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.gh0u1l5.wechatmagician"
4-
android:versionCode="19"
5-
android:versionName="2.2.0">
4+
android:versionCode="20"
5+
android:versionName="2.2.1">
66

77
<uses-permission android:name="android.permission.INTERNET"/>
88
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

src/main/kotlin/com/gh0u1l5/wechatmagician/util/ImageUtil.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ object ImageUtil {
4545
val encEngine = newInstance(WechatPackage.EncEngine, media.key)
4646
callMethod(encEngine, WechatPackage.EncEngineEDMethod, content, content.size)
4747

48-
val out = FileOutputStream(path)
48+
val file = File(path)
49+
file.parentFile.mkdirs()
50+
val out = FileOutputStream(file)
4951
out.write(content)
5052
out.close()
5153
}

0 commit comments

Comments
 (0)