fix: properly convert CString to String
This commit is contained in:
parent
8835f91cb6
commit
bc4a0fe7df
3 changed files with 6 additions and 4 deletions
|
|
@ -5,10 +5,12 @@ import os
|
|||
let vendettaLog = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "vendetta")
|
||||
let source = URL(string: "vendetta")!
|
||||
|
||||
let install_prefix = String(cString: get_install_prefix())
|
||||
|
||||
let vendettaPatchesBundlePath =
|
||||
FileManager.default.fileExists(
|
||||
atPath: "\(install_prefix())/Library/Application Support/VendettaTweak/VendettaPatches.bundle")
|
||||
? "\(install_prefix())/Library/Application Support/VendettaTweak/VendettaPatches.bundle"
|
||||
atPath: "\(install_prefix)/Library/Application Support/VendettaTweak/VendettaPatches.bundle")
|
||||
? "\(install_prefix)/Library/Application Support/VendettaTweak/VendettaPatches.bundle"
|
||||
: "\(Bundle.main.bundleURL.path)/VendettaPatches.bundle"
|
||||
|
||||
class LoadHook: ClassHook<RCTCxxBridge> {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#import <Orion/Orion.h>
|
||||
|
||||
const char * const _Nonnull install_prefix(void) {
|
||||
const char * const _Nonnull get_install_prefix(void) {
|
||||
return THEOS_PACKAGE_INSTALL_PREFIX;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#import "RCTCxxBridge.h"
|
||||
|
||||
const char * const _Nonnull install_prefix(void);
|
||||
const char * const _Nonnull get_install_prefix(void);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue