Kaydet (Commit) ba5b2aef authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS qadev22 (1.10.2); FILE MERGED

2005/03/17 13:18:43 sg 1.10.2.3: #i44053#CHG: fixed typo in getOfficeUserPath method
2005/03/17 13:14:04 sg 1.10.2.2: #i44053#CHG: removed java 131 incompatibilities
2005/03/17 13:11:43 sg 1.10.2.1: #i44053#CHG: removed java 131 incompatibilities
üst 74c13162
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: utils.java,v $ * $RCSfile: utils.java,v $
* *
* $Revision: 1.10 $ * $Revision: 1.11 $
* *
* last change:$Date: 2005-02-24 17:23:20 $ * last change:$Date: 2005-03-29 11:54:23 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -253,7 +253,7 @@ public class utils { ...@@ -253,7 +253,7 @@ public class utils {
* This method get's the user dir of the connected office * This method get's the user dir of the connected office
* *
*/ */
public static String getOfficeUserPath (XMultiServiceFactory msf) { public static String getOfficeUserPath(XMultiServiceFactory msf) {
String userPath = null; String userPath = null;
// get a folder wich is located in the user dir // get a folder wich is located in the user dir
...@@ -265,12 +265,13 @@ public class utils { ...@@ -265,12 +265,13 @@ public class utils {
} }
// strip the returned folder to the user dir // strip the returned folder to the user dir
String[] split = userPath.split("/"); if (userPath.charAt(userPath.length() - 1) == '/')
String returnValue = split[0]; userPath = userPath.substring(0, userPath.length() - 1);
for (int i=1; i<(split.length-1); i++) int index = userPath.lastIndexOf('/');
returnValue += "/" + split[i]; if (index != -1)
userPath = userPath.substring(0, index);
return returnValue; return userPath;
} }
/** /**
...@@ -749,4 +750,4 @@ public class utils { ...@@ -749,4 +750,4 @@ public class utils {
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment