We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2646386 commit 018eb13Copy full SHA for 018eb13
android/src/main/java/com/alpha0010/fs/FileAccessModule.kt
@@ -380,7 +380,8 @@ class FileAccessModule(reactContext: ReactApplicationContext) : ReactContextBase
380
@ReactMethod
381
fun unlink(path: String, promise: Promise) {
382
try {
383
- if (parsePathToFile(path).delete()) {
+ val file = parsePathToFile(path)
384
+ if (file.exists() && file.deleteRecursively()) {
385
promise.resolve(null)
386
} else {
387
promise.reject("ERR", "Failed to unlink '$path'.")
0 commit comments