Closed GoogleCodeExporter closed 9 years ago
Is it an issue with the included test file only? Or does this issue happen also
with your own saved files?
With the test file, it is a known behavior since it was saved on windows in OS
X seems to not accept "\" file separator in a path, unlike linux and windows.
Anyway, the next revision of the tool will be platform independant for the
paths and will support "\" and "/", so a file saved on Windows will work on OS
X and vice-versa.
Original comment by aurelien.ribon
on 9 Sep 2011 at 7:33
It's a problem with the included test file, and my own saved file.
Original comment by kensuke...@gmail.com
on 14 Sep 2011 at 8:50
Actually, after looking at the source, now I'm not sure about my last statement.
The bug is on line 69 of IO.java:
String name = is.readUTF();
Should be:
String name = FileUtils.convertSystemPath(is.readUTF(), File.separator);
Where the method I added is:
public static String convertSystemPath(String path, String pathSeparator) {
if (pathSeparator.equals("/")) {
return FilenameUtils.separatorsToUnix(path);
}
else if (pathSeparator.equals("\\")) {
return FilenameUtils.separatorsToWindows(path);
}
else {
throw new IllegalArgumentException("Unrecognised dir separator '" + pathSeparator + "'");
}
}
Original comment by kensuke...@gmail.com
on 15 Sep 2011 at 7:32
Thanks, that's what I included to make the next revision system-independent. I
was absent for a week but will fix these errors ASAP now.
Original comment by aurelien.ribon
on 16 Sep 2011 at 8:27
This issue was closed by revision 90414bcc76d9.
Original comment by aurelien.ribon
on 28 Sep 2011 at 8:58
Original issue reported on code.google.com by
kensuke...@gmail.com
on 8 Sep 2011 at 4:28