mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-07 09:17:55 +08:00
Use path instead of resourceSpecifier so it unescapes.
Reviewed By: @nicklockwood Differential Revision: D2526217 fb-gh-sync-id: c48af71402927b0aa4e9942e1825068af5334ab9
This commit is contained in:
committed by
facebook-github-bot-4
parent
de0e039898
commit
f52cd5dc1e
@@ -33,7 +33,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
|
||||
// Load local script file
|
||||
if (scriptURL.fileURL) {
|
||||
NSString *filePath = scriptURL.resourceSpecifier;
|
||||
NSString *filePath = scriptURL.path;
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
NSError *error = nil;
|
||||
NSString *rawText = [NSString stringWithContentsOfFile:filePath usedEncoding:NULL error:&error];
|
||||
|
||||
Reference in New Issue
Block a user