cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaanHoogland <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Made the adding new keyboard language sup...
Date Fri, 20 May 2016 08:58:04 GMT
Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/669#discussion_r64009630
  
    --- Diff: plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java
---
    @@ -594,6 +597,25 @@ private PlugNicAnswer execute(final PlugNicCommand cmd) {
             }
         }
     
    +    private CopyFileInVmAnswer execute(CopyFileInVmCommand cmd) {
    +        File keyFile = getSystemVMKeyFile();
    +        try {
    +            File file = new File(cmd.getSrc());
    +            if(file.exists()) {
    +                if(file.isDirectory()) {
    +                    for (File f : FileUtils.listFiles(new File(cmd.getSrc()), TrueFileFilter.INSTANCE,
TrueFileFilter.INSTANCE)) {
    +                        SshHelper.scpTo(cmd.getVmIp(), 3922, "root", keyFile, null, cmd.getDest(),
f.getCanonicalPath(), null);
    +                    }
    +                } else {
    +                    SshHelper.scpTo(cmd.getVmIp(), 3922, "root", keyFile, null, cmd.getDest(),
file.getCanonicalPath(), null);
    +                }
    +            }
    +        } catch (Exception e) {
    --- End diff --
    
    The message can be more specific and explanatory. The SshHelper  shouldn't throw such
a generic exception anyway. This is sloppy development and we now have a good chance to improve
on it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message