Github user sedukull commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/669#discussion_r36609071
  
    --- Diff: 
plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
 ---
    @@ -1279,6 +1285,27 @@ private static DiskTO getIsoDiskTO(DiskTO[] disks) {
             return null;
         }
     
    +    private CopyFileInVmAnswer execute(CopyFileInVmCommand cmd) {
    +        VmwareManager mgr = 
getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
    +        File keyFile = mgr.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)) {
    --- End diff --
    
    As well, here if its a directory, we are using multiple file objects, are 
these auto closed and resources consumed are released back or does the api for 
File..provides that facility?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to