Update a_sync.rs

This commit is contained in:
Osei Fortune
2022-03-07 13:02:12 -04:00
parent be1d384180
commit 2fa6b4bd79

View File

@@ -1624,7 +1624,7 @@ pub extern "system" fn Java_org_nativescript_widgets_filesystem_FileSystem_nativ
let callback = AsyncClosure::<(), std::io::Error>::new(Box::new(move |_, error| {
if let Some(error) = error {
on_success.on_error(jni::objects::JValue::Object(
error_to_jstring(error.unwrap()).as_obj(),
error_to_jstring(error).as_obj(),
))
} else {
on_success.on_success(JObject::null().into())