diff --git a/lib/common b/lib/common index e42406169d..1ecec5d2cf 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit e42406169d8231b4fc1ddbd40dcc947df8f915e2 +Subproject commit 1ecec5d2cf5f242d2c87345d68022ecbcd35927c diff --git a/lib/services/livesync/platform-livesync-service.ts b/lib/services/livesync/platform-livesync-service.ts index 4754dcfa79..316b2f269b 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"; @@ -223,7 +224,7 @@ export abstract class PlatformLiveSyncServiceBase implements IPlatformLiveSyncSe private async getLiveSyncInfoFilePath(deviceAppData: Mobile.IDeviceAppData): Promise { let deviceRootPath = path.dirname(await deviceAppData.getDeviceProjectRootPath()); - let deviceFilePath = path.join(deviceRootPath, livesyncInfoFileName); + let deviceFilePath = helpers.fromWindowsRelativePathToUnix(path.join(deviceRootPath, livesyncInfoFileName)); return deviceFilePath; } diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index aabf8fcf5e..efd13a8ec6 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -503,7 +503,7 @@ export class PlatformService implements IPlatformService { private async getDeviceBuildInfoFilePath(device: Mobile.IDevice): Promise { let deviceAppData = this.$deviceAppDataFactory.create(this.$projectData.projectId, device.deviceInfo.platform, device); let deviceRootPath = path.dirname(await deviceAppData.getDeviceProjectRootPath()); - return path.join(deviceRootPath, buildInfoFileName); + return helpers.fromWindowsRelativePathToUnix(path.join(deviceRootPath, buildInfoFileName)); } private async getDeviceBuildInfo(device: Mobile.IDevice): Promise { diff --git a/lib/services/project-changes-service.ts b/lib/services/project-changes-service.ts index d1be43fdc2..27fd8d69db 100644 --- a/lib/services/project-changes-service.ts +++ b/lib/services/project-changes-service.ts @@ -33,6 +33,7 @@ export class ProjectChangesService implements IProjectChangesService { private _prepareInfo: IPrepareInfo; private _newFiles: number = 0; private _outputProjectMtime: number; + private _outputProjectCTime: number; constructor( private $platformsData: IPlatformsData, @@ -140,6 +141,7 @@ export class ProjectChangesService implements IProjectChangesService { let platformData = this.$platformsData.getPlatformData(platform); let prepareInfoFile = path.join(platformData.projectRoot, prepareInfoFileName); this._outputProjectMtime = this.$fs.getFsStats(prepareInfoFile).mtime.getTime(); + this._outputProjectCTime = this.$fs.getFsStats(prepareInfoFile).ctime.getTime(); return false; } this._prepareInfo = { @@ -150,6 +152,7 @@ export class ProjectChangesService implements IProjectChangesService { changesRequireBuildTime: null }; this._outputProjectMtime = 0; + this._outputProjectCTime = 0; this._changesInfo.appFilesChanged = true; this._changesInfo.appResourcesChanged = true; this._changesInfo.modulesChanged = true; @@ -161,7 +164,7 @@ export class ProjectChangesService implements IProjectChangesService { for (let file of files) { if (this.$fs.exists(file)) { let fileStats = this.$fs.getFsStats(file); - if (fileStats.mtime.getTime() > this._outputProjectMtime) { + if (fileStats.mtime.getTime() >= this._outputProjectMtime || fileStats.ctime.getTime() >= this._outputProjectCTime) { return true; } } @@ -179,11 +182,10 @@ export class ProjectChangesService implements IProjectChangesService { let fileStats = this.$fs.getFsStats(filePath); - let changed = fileStats.mtime.getTime() > this._outputProjectMtime || fileStats.ctime.getTime() > this._outputProjectMtime; - + let changed = fileStats.mtime.getTime() >= this._outputProjectMtime || fileStats.ctime.getTime() >= this._outputProjectCTime; if (!changed) { let lFileStats = this.$fs.getLsStats(filePath); - changed = lFileStats.mtime.getTime() > this._outputProjectMtime || lFileStats.ctime.getTime() > this._outputProjectMtime; + changed = lFileStats.mtime.getTime() >= this._outputProjectMtime || lFileStats.ctime.getTime() >= this._outputProjectCTime; } if (changed) {