Skip to content

Commit be67302

Browse files
Fix uploading of .nsprepareinfo on Windows (#2538)
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.
1 parent c5ec493 commit be67302

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/livesync/platform-livesync-service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import syncBatchLib = require("../../common/services/livesync/sync-batch");
22
import * as path from "path";
33
import * as minimatch from "minimatch";
44
import * as util from "util";
5+
import * as helpers from "../../common/helpers";
56

67
const livesyncInfoFileName = ".nslivesyncinfo";
78

@@ -236,7 +237,7 @@ export abstract class PlatformLiveSyncServiceBase implements IPlatformLiveSyncSe
236237

237238
private getLiveSyncInfoFilePath(deviceAppData: Mobile.IDeviceAppData) {
238239
let deviceRootPath = path.dirname(deviceAppData.deviceProjectRootPath);
239-
let deviceFilePath = path.join(deviceRootPath, livesyncInfoFileName);
240+
let deviceFilePath = helpers.fromWindowsRelativePathToUnix(path.join(deviceRootPath, livesyncInfoFileName));
240241
return deviceFilePath;
241242
}
242243

0 commit comments

Comments
 (0)