maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r365840 - /maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java
Date Wed, 04 Jan 2006 06:22:42 GMT
Author: brett
Date: Tue Jan  3 22:22:39 2006
New Revision: 365840

URL: http://svn.apache.org/viewcvs?rev=365840&view=rev
Log:
must set umask in same session for it to take effect
PR: WAGONSSH-27

Modified:
    maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java
URL: http://svn.apache.org/viewcvs/maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java?rev=365840&r1=365839&r2=365840&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java
Tue Jan  3 22:22:39 2006
@@ -18,11 +18,11 @@
 
 import com.jcraft.jsch.ChannelExec;
 import com.jcraft.jsch.JSchException;
+import org.apache.maven.wagon.CommandExecutionException;
 import org.apache.maven.wagon.PathUtils;
+import org.apache.maven.wagon.PermissionModeUtils;
 import org.apache.maven.wagon.ResourceDoesNotExistException;
 import org.apache.maven.wagon.TransferFailedException;
-import org.apache.maven.wagon.CommandExecutionException;
-import org.apache.maven.wagon.PermissionModeUtils;
 import org.apache.maven.wagon.authorization.AuthorizationException;
 import org.apache.maven.wagon.repository.RepositoryPermissions;
 import org.apache.maven.wagon.resource.Resource;
@@ -71,18 +71,23 @@
 
         try
         {
+            String umaskCmd = null;
             if ( getRepository().getPermissions() != null )
             {
                 String dirPerms = getRepository().getPermissions().getDirectoryMode();
 
                 if ( dirPerms != null )
                 {
-                    String umaskCmd = "umask " + PermissionModeUtils.getUserMaskFor( dirPerms
);
-                    executeCommand( umaskCmd );
+                    umaskCmd = "umask " + PermissionModeUtils.getUserMaskFor( dirPerms );
                 }
             }
 
             String mkdirCmd = "mkdir -p " + getPath( basedir, dir );
+
+            if ( umaskCmd != null )
+            {
+                mkdirCmd = umaskCmd + "; " + mkdirCmd;
+            }
 
             executeCommand( mkdirCmd );
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message