From ef4f6d4baba9c4311e3650825ea90fcfa287ee93 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Tue, 14 Feb 2017 15:14:02 +0200 Subject: [PATCH] Fix uploading of .nsprepareinfo on Windows When `.nprepareinfo` file is uploaded on device, we construct the device file path with `path.join` function. On Windows this function returns path similar to `\\data\\local\\tmp`, which is not working for Unix based OSes (Android in this case). Fix this by converting the path to Unix style. --- lib/services/livesync/platform-livesync-service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/services/livesync/platform-livesync-service.ts b/lib/services/livesync/platform-livesync-service.ts index 4eddb60789..edbf878515 100644 --- a/lib/services/livesync/platform-livesync-service.ts +++ b/lib/services/livesync/platform-livesync-service.ts @@ -2,6 +2,7 @@ import syncBatchLib = require("../../common/services/livesync/sync-batch"); import * as path from "path"; import * as minimatch from "minimatch"; import * as util from "util"; +import * as helpers from "../../common/helpers"; const livesyncInfoFileName = ".nslivesyncinfo"; @@ -236,7 +237,7 @@ export abstract class PlatformLiveSyncServiceBase implements IPlatformLiveSyncSe private getLiveSyncInfoFilePath(deviceAppData: Mobile.IDeviceAppData) { let deviceRootPath = path.dirname(deviceAppData.deviceProjectRootPath); - let deviceFilePath = path.join(deviceRootPath, livesyncInfoFileName); + let deviceFilePath = helpers.fromWindowsRelativePathToUnix(path.join(deviceRootPath, livesyncInfoFileName)); return deviceFilePath; }