[Utils] Create & move document directory into it
This commit is contained in:
parent
62e40d0ead
commit
5583ebda52
2 changed files with 7 additions and 2 deletions
|
|
@ -26,8 +26,7 @@ class LoadHook: ClassHook<RCTCxxBridge> {
|
|||
}
|
||||
}
|
||||
|
||||
let documentDirectory = try! FileManager.default.url(
|
||||
for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
|
||||
let documentDirectory = getDocumentDirectory()
|
||||
|
||||
var vendetta = try? Data(contentsOf: documentDirectory.appendingPathComponent("vendetta.js"))
|
||||
|
||||
|
|
|
|||
6
Sources/VendettaTweak/Utils.x.swift
Normal file
6
Sources/VendettaTweak/Utils.x.swift
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import Foundation
|
||||
|
||||
func getDocumentDirectory() -> URL {
|
||||
return try! FileManager.default.url(
|
||||
for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue