You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2005/07/12 09:08:10 UTC

svn commit: r215932 - /jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/smb/SmbFileName.java

Author: imario
Date: Tue Jul 12 00:08:07 2005
New Revision: 215932

URL: http://svn.apache.org/viewcvs?rev=215932&view=rev
Log:
do not add domain name to uri if it is not set

Modified:
    jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/smb/SmbFileName.java

Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/smb/SmbFileName.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/smb/SmbFileName.java?rev=215932&r1=215931&r2=215932&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/smb/SmbFileName.java (original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/smb/SmbFileName.java Tue Jul 12 00:08:07 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 2002-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,9 +67,13 @@
         buffer.append(share);
     }
 
+    /**
+     * put domain before username if both are set
+     */
     protected void appendCredentials(StringBuffer buffer)
     {
-        if (getUserName() != null && getUserName().length() != 0)
+        if (getDomain() != null && getDomain().length() != 0 &&
+            getUserName() != null && getUserName().length() != 0)
         {
             buffer.append(getDomain());
             buffer.append("\\");



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org