From 04eddee710d7e6e0f91b83a3419339f98590884e Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Thu, 4 Feb 2016 10:43:12 +0200 Subject: [PATCH] Fix paths in iOS, some devices and iOS combinations use /private/var paths while some /var/ this was normalized by resolvin symlinks --- apps/tests/file-system-tests.ts | 2 +- file-system/file-system-access.ios.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/tests/file-system-tests.ts b/apps/tests/file-system-tests.ts index acdbb51e2..97fd2c219 100644 --- a/apps/tests/file-system-tests.ts +++ b/apps/tests/file-system-tests.ts @@ -232,7 +232,7 @@ export var testFileReadWriteBinary = function () { var fileName = "logo.png"; var error; - var sourceFile = fs.knownFolders.currentApp().getFile(fileName); + var sourceFile = fs.File.fromPath(__dirname + "/" + fileName); var destinationFile = fs.knownFolders.documents().getFile(fileName); var source = sourceFile.readSync(e=> { error = e; }); diff --git a/file-system/file-system-access.ios.ts b/file-system/file-system-access.ios.ts index 6fb03518a..d7b4b9f3f 100644 --- a/file-system/file-system-access.ios.ts +++ b/file-system/file-system-access.ios.ts @@ -215,7 +215,9 @@ export class FileSystemAccess { } public getLogicalRootPath(): string { - return NSBundle.mainBundle().bundlePath; + let mainBundlePath = NSBundle.mainBundle().bundlePath; + let resolvedPath = NSString.stringWithString(mainBundlePath).stringByResolvingSymlinksInPath; + return resolvedPath; } public getDocumentsFolderPath(): string {