chore(ios): remove some warnings (#4159)

This commit is contained in:
Olivier Bouillet
2024-09-13 10:49:43 +02:00
committed by GitHub
parent 2c1fc964bf
commit 7118ba6819
7 changed files with 40 additions and 52 deletions

View File

@@ -60,13 +60,11 @@ enum RCTVideoSave {
static func ensureDirExists(withPath path: String?) -> Bool {
var isDir: ObjCBool = false
var error: Error?
let exists = FileManager.default.fileExists(atPath: path ?? "", isDirectory: &isDir)
if !(exists && isDir.boolValue) {
do {
try FileManager.default.createDirectory(atPath: path ?? "", withIntermediateDirectories: true, attributes: nil)
} catch {}
if error != nil {
} catch {
return false
}
}