@@ -47,8 +47,7 @@ export class ProjectChangesService implements IProjectChangesService {
47
47
constructor (
48
48
private $platformsData : IPlatformsData ,
49
49
private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
50
- private $fs : IFileSystem ,
51
- private $hostInfo : IHostInfo ) {
50
+ private $fs : IFileSystem ) {
52
51
}
53
52
54
53
public get currentChanges ( ) : IProjectChangesInfo {
@@ -69,6 +68,7 @@ export class ProjectChangesService implements IProjectChangesService {
69
68
path . join ( projectData . projectDir , NODE_MODULES_FOLDER_NAME , "tns-ios-inspector" ) ,
70
69
projectData ,
71
70
this . fileChangeRequiresBuild ) ;
71
+
72
72
if ( this . _newFiles > 0 ) {
73
73
this . _changesInfo . modulesChanged = true ;
74
74
}
@@ -231,14 +231,6 @@ export class ProjectChangesService implements IProjectChangesService {
231
231
let changed = fileStats . mtime . getTime ( ) > this . _outputProjectMtime ||
232
232
fileStats . ctime . getTime ( ) >= this . _outputProjectCTime ;
233
233
234
- if ( this . $hostInfo . isDarwin && ! fileStats . isDirectory ( ) && ! changed ) {
235
- const parentDirPath : string = path . dirname ( filePath ) ;
236
- const parentDirStat = this . $fs . getFsStats ( parentDirPath ) ;
237
-
238
- changed = parentDirStat . mtime . getTime ( ) > this . _outputProjectMtime ||
239
- parentDirStat . ctime . getTime ( ) >= this . _outputProjectCTime ;
240
- }
241
-
242
234
if ( changed ) {
243
235
if ( processFunc ) {
244
236
this . _newFiles ++ ;
@@ -252,14 +244,25 @@ export class ProjectChangesService implements IProjectChangesService {
252
244
}
253
245
254
246
if ( fileStats . isDirectory ( ) ) {
247
+ if ( this . isFolderModified ( dir ) ) {
248
+ return true ;
249
+ }
250
+
255
251
if ( this . containsNewerFiles ( filePath , skipDir , projectData , processFunc ) ) {
256
252
return true ;
257
253
}
258
254
}
255
+
259
256
}
260
257
return false ;
261
258
}
262
259
260
+ private isFolderModified ( dirPath : string ) : boolean {
261
+ const parentDirStat = this . $fs . getFsStats ( dirPath ) ;
262
+ return parentDirStat . mtime . getTime ( ) > this . _outputProjectMtime ||
263
+ parentDirStat . ctime . getTime ( ) >= this . _outputProjectCTime ;
264
+ }
265
+
263
266
private fileChangeRequiresBuild ( file : string , projectData : IProjectData ) {
264
267
if ( path . basename ( file ) === "package.json" ) {
265
268
return true ;
0 commit comments