maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r392495 - /maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/sshext/ScpExternalWagon.java
Date Sat, 08 Apr 2006 08:28:04 GMT
Author: brett
Date: Sat Apr  8 01:28:02 2006
New Revision: 392495

URL: http://svn.apache.org/viewcvs?rev=392495&view=rev
Log:
[WAGONSSH-44] fix directory permissions for wagon-ssh-external
Submitted by: Trustin Lee

Modified:
    maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/sshext/ScpExternalWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/sshext/ScpExternalWagon.java
URL: http://svn.apache.org/viewcvs/maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/sshext/ScpExternalWagon.java?rev=392495&r1=392494&r2=392495&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/sshext/ScpExternalWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh-external/src/main/java/org/apache/maven/wagon/providers/sshext/ScpExternalWagon.java
Sat Apr  8 01:28:02 2006
@@ -331,7 +331,23 @@
 
         dir = StringUtils.replace( dir, "\\", "/" );
 
+        String umaskCmd = null;
+        if ( getRepository().getPermissions() != null )
+        {
+            String dirPerms = getRepository().getPermissions().getDirectoryMode();
+
+            if ( dirPerms != null )
+            {
+                umaskCmd = "umask " + PermissionModeUtils.getUserMaskFor( dirPerms );
+            }
+        }
+
         String mkdirCmd = "mkdir -p " + basedir + "/" + dir + "\n";
+
+        if ( umaskCmd != null )
+        {
+            mkdirCmd = umaskCmd + "; " + mkdirCmd;
+        }
 
         try
         {



---------------------------------------------------------------------
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