I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 4976e523 authored by zzz's avatar zzz
Browse files

Pluck of 40d650b134e48bdb0bb636227381c22217365c47

* WorkingDir: Correctly strip DOS line endings while migrating,
              to fix eepsite location on 0.9.5 Windows installs (ticket #919)

applied changes from cc74155815c98674b74cd7d9abb59704005d6b85
             through 40d650b134e48bdb0bb636227381c22217365c47
parent 88afb23a
No related branches found
No related tags found
No related merge requests found
......@@ -294,6 +294,9 @@ public class WorkingDir {
String s = null;
boolean isDaemon = DAEMON_USER.equals(System.getProperty("user.name"));
while ((s = DataHelper.readLine(in)) != null) {
// readLine() doesn't strip \r
if (s.endsWith("\r"))
s = s.substring(0, s.length() - 1);
if (s.endsWith("=\"eepsite/jetty.xml\"")) {
s = s.replace("=\"eepsite/jetty.xml\"", "=\"" + todir.getAbsolutePath() +
File.separatorChar + "eepsite" +
......@@ -333,6 +336,9 @@ public class WorkingDir {
out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new SecureFileOutputStream(newFile), "UTF-8")));
String s = null;
while ((s = DataHelper.readLine(in)) != null) {
// readLine() doesn't strip \r
if (s.endsWith("\r"))
s = s.substring(0, s.length() - 1);
if (s.indexOf(oldString) >= 0) {
s = s.replace(oldString, newString);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment