@@ -58,7 +58,7 @@ export abstract class PlatformLiveSyncServiceBase {
58
58
const syncInfo = _ . merge < IFullSyncInfo > ( { device, watch : true } , liveSyncInfo ) ;
59
59
const deviceAppData = await this . getAppData ( syncInfo ) ;
60
60
61
- const modifiedLocalToDevicePaths : Mobile . ILocalToDevicePathData [ ] = [ ] ;
61
+ let modifiedLocalToDevicePaths : Mobile . ILocalToDevicePathData [ ] = [ ] ;
62
62
if ( liveSyncInfo . filesToSync . length ) {
63
63
const filesToSync = liveSyncInfo . filesToSync ;
64
64
const mappedFiles = _ . map ( filesToSync , filePath => this . $projectFilesProvider . mapFilePath ( filePath , device . deviceInfo . platform , projectData ) ) ;
@@ -77,7 +77,7 @@ export abstract class PlatformLiveSyncServiceBase {
77
77
const localToDevicePaths = await this . $projectFilesManager . createLocalToDevicePaths ( deviceAppData ,
78
78
projectFilesPath , existingFiles , [ ] ) ;
79
79
modifiedLocalToDevicePaths . push ( ...localToDevicePaths ) ;
80
- await this . transferFiles ( deviceAppData , localToDevicePaths , projectFilesPath , false ) ;
80
+ modifiedLocalToDevicePaths = await this . transferFiles ( deviceAppData , localToDevicePaths , projectFilesPath , false ) ;
81
81
}
82
82
}
83
83
@@ -105,11 +105,11 @@ export abstract class PlatformLiveSyncServiceBase {
105
105
}
106
106
107
107
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 [ ] = [ ] ;
109
109
if ( isFullSync ) {
110
110
transferredFiles = await deviceAppData . device . fileSystem . transferDirectory ( deviceAppData , localToDevicePaths , projectFilesPath ) ;
111
111
} else {
112
- await deviceAppData . device . fileSystem . transferFiles ( deviceAppData , localToDevicePaths ) ;
112
+ transferredFiles = await deviceAppData . device . fileSystem . transferFiles ( deviceAppData , localToDevicePaths ) ;
113
113
}
114
114
115
115
this . logFilesSyncInformation ( transferredFiles , "Successfully transferred %s." , this . $logger . info ) ;
0 commit comments