package org.tizen.common.rds;
+import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
if ( DeltaResourceInfo.TYPE_MODIFY.equals(node.getType()) ) {
try {
command = RdsDeployer.makeRdsLog(NLS.bind(RdsMessages.RDS_PUSH_LOG, node.getFullPath(), strRemotePath));
- SyncResult result = device.getSyncService().pushFile(node.getFullPath(), strRemotePath, SyncService.getNullProgressMonitor());
- if ( result.getCode() == SyncService.RESULT_NO_LOCAL_FILE || result.getCode() == SyncService.RESULT_LOCAL_IS_DIRECTORY) {
- throw new IOException(command);
+ if ( new File(node.getFullPath()).isDirectory() ) {
+ tizenCommand.runCommand( "mkdir -p -m 755 " + strRemotePath + TizenPlatformConstants.CMD_SUFFIX , true, null);
}
+ else {
+ SyncResult result = device.getSyncService().pushFile(node.getFullPath(), strRemotePath, SyncService.getNullProgressMonitor());
+ if ( result.getCode() == SyncService.RESULT_NO_LOCAL_FILE || result.getCode() == SyncService.RESULT_LOCAL_IS_DIRECTORY) {
+ throw new IOException(command);
+ }
+ }
+
printInfo( command );
- } catch (IOException e) {
+ } catch (Exception e) {
newCoreException(RdsDeployer.makeRdsLog(RdsMessages.RDS_PUSH_ERROR), e);
}
}