@@ -58,7 +58,7 @@ export abstract class PlatformLiveSyncServiceBase {
5858 const syncInfo = _ . merge < IFullSyncInfo > ( { device, watch : true } , liveSyncInfo ) ;
5959 const deviceAppData = await this . getAppData ( syncInfo ) ;
6060
61- const modifiedLocalToDevicePaths : Mobile . ILocalToDevicePathData [ ] = [ ] ;
61+ let modifiedLocalToDevicePaths : Mobile . ILocalToDevicePathData [ ] = [ ] ;
6262 if ( liveSyncInfo . filesToSync . length ) {
6363 const filesToSync = liveSyncInfo . filesToSync ;
6464 const mappedFiles = _ . map ( filesToSync , filePath => this . $projectFilesProvider . mapFilePath ( filePath , device . deviceInfo . platform , projectData ) ) ;
@@ -77,7 +77,7 @@ export abstract class PlatformLiveSyncServiceBase {
7777 const localToDevicePaths = await this . $projectFilesManager . createLocalToDevicePaths ( deviceAppData ,
7878 projectFilesPath , existingFiles , [ ] ) ;
7979 modifiedLocalToDevicePaths . push ( ...localToDevicePaths ) ;
80- await this . transferFiles ( deviceAppData , localToDevicePaths , projectFilesPath , false ) ;
80+ modifiedLocalToDevicePaths = await this . transferFiles ( deviceAppData , localToDevicePaths , projectFilesPath , false ) ;
8181 }
8282 }
8383
@@ -105,11 +105,11 @@ export abstract class PlatformLiveSyncServiceBase {
105105 }
106106
107107 protected async transferFiles ( deviceAppData : Mobile . IDeviceAppData , localToDevicePaths : Mobile . ILocalToDevicePathData [ ] , projectFilesPath : string , isFullSync : boolean ) : Promise < Mobile . ILocalToDevicePathData [ ] > {
108- let transferredFiles = localToDevicePaths ;
108+ let transferredFiles : Mobile . ILocalToDevicePathData [ ] = [ ] ;
109109 if ( isFullSync ) {
110110 transferredFiles = await deviceAppData . device . fileSystem . transferDirectory ( deviceAppData , localToDevicePaths , projectFilesPath ) ;
111111 } else {
112- await deviceAppData . device . fileSystem . transferFiles ( deviceAppData , localToDevicePaths ) ;
112+ transferredFiles = await deviceAppData . device . fileSystem . transferFiles ( deviceAppData , localToDevicePaths ) ;
113113 }
114114
115115 this . logFilesSyncInformation ( transferredFiles , "Successfully transferred %s." , this . $logger . info ) ;
0 commit comments