Fix paths in iOS, some devices and iOS combinations use /private/var paths while some /var/ this was normalized by resolvin symlinks

This commit is contained in:
Panayot Cankov
2016-02-04 10:43:12 +02:00
parent 0d4d0b0d4a
commit 04eddee710
2 changed files with 4 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ export var testFileReadWriteBinary = function () {
var fileName = "logo.png"; var fileName = "logo.png";
var error; var error;
var sourceFile = fs.knownFolders.currentApp().getFile(fileName); var sourceFile = fs.File.fromPath(__dirname + "/" + fileName);
var destinationFile = fs.knownFolders.documents().getFile(fileName); var destinationFile = fs.knownFolders.documents().getFile(fileName);
var source = sourceFile.readSync(e=> { error = e; }); var source = sourceFile.readSync(e=> { error = e; });

View File

@@ -215,7 +215,9 @@ export class FileSystemAccess {
} }
public getLogicalRootPath(): string { public getLogicalRootPath(): string {
return NSBundle.mainBundle().bundlePath; let mainBundlePath = NSBundle.mainBundle().bundlePath;
let resolvedPath = NSString.stringWithString(mainBundlePath).stringByResolvingSymlinksInPath;
return resolvedPath;
} }
public getDocumentsFolderPath(): string { public getDocumentsFolderPath(): string {