[Swift-commit] cog r3431

swift at ci.uchicago.edu swift at ci.uchicago.edu
Thu Jul 19 01:05:03 CDT 2012


------------------------------------------------------------------------
r3431 | hategan | 2012-07-19 01:01:37 -0500 (Thu, 19 Jul 2012) | 1 line

create destination directories when transferring
------------------------------------------------------------------------
Index: modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java
===================================================================
--- modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java	(revision 3430)
+++ modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java	(working copy)
@@ -311,6 +311,7 @@
                         logger
                                 .debug("Directory transfer with resource local->local");
                     }
+                    fr.createDirectories(spec.getDestinationDirectory());
                     fr.putFile(new FileFragmentImpl(localSource.getAbsolutePath()), 
                         new FileFragmentImpl(spec.getDestination()));
                 }
@@ -334,6 +335,8 @@
                         logger
                                 .debug("File transfer with resource local->remote");
                     }
+                    
+                    this.destinationResource.createDirectories(spec.getDestinationDirectory());
                     this.destinationResource.putFile(new FileFragmentImpl(localSource
                             .getAbsolutePath()), new FileFragmentImpl(spec.getDestination()),
                             new ProgressMonitor() {
@@ -522,6 +525,7 @@
         logger.debug("Performing third party transfer");
         
         try {
+            this.destinationResource.createDirectories(spec.getDestinationDirectory());
             this.destinationResource.thirdPartyTransfer(this.sourceResource, 
                 makeFragment(spec.getSource(), spec.getSourceOffset(), spec.getSourceLength()), 
                 makeFragment(spec.getDestination(), spec.getDestinationOffset(), spec.getSourceLength()));



More information about the Swift-commit mailing list