fix problem with truncated filenames on non-ascii systems (bug #1089)

This commit is contained in:
benfry
2009-02-20 01:15:26 +00:00
parent c08f7d3670
commit ed5e77f8db
+14 -1
View File
@@ -320,7 +320,20 @@ public class Base {
// Check if any files were passed in on the command line
for (int i = 0; i < args.length; i++) {
if (handleOpen(args[i]) != null) {
String path = args[i];
// Fix a problem with systems that use a non-ASCII languages. Paths are
// being passed in with 8.3 syntax, which makes the sketch loader code
// unhappy, since the sketch folder naming doesn't match up correctly.
// http://dev.processing.org/bugs/show_bug.cgi?id=1089
if (isWindows()) {
try {
File file = new File(args[i]);
path = file.getCanonicalPath();
} catch (IOException e) {
e.printStackTrace();
}
}
if (handleOpen(path) != null) {
opened = true;
}
}