platform/bb/rhodes/src/com/rho/Jsr75File.java in rhodes-1.4.2 vs platform/bb/rhodes/src/com/rho/Jsr75File.java in rhodes-1.5.0

- old
+ new

@@ -228,11 +228,12 @@ String strRoot = getRhoPath(); if ( strRoot == null ) throw new IOException("Could not find storage"); if ( strDir != null && strDir.length() > 0 ){ - String strDirPath = strRoot + strDir + "/"; + String strDirPath = FilePath.join(strRoot, strDir); + strDirPath = FilePath.join(strDirPath, "/"); createDir( strDirPath ); return strDirPath; } return strRoot; @@ -366,14 +367,10 @@ /*if (url.startsWith("/")) { url = "file:///" + path; } else {*/ try{ - url = getRhoPath(); - if ( path.charAt(0) == '/' || path.charAt(0) == '\\' ) - url += path.substring(1); - else - url += path; + url = FilePath.join(getRhoPath(), path); } catch (IOException x) { log("getRhoPath Exception: " + x.getMessage()); throw x; }