Good morning
Thanks again for Weasis, love this light-weight yet powerful viewer.
Had a buddy who used her full name (wonderful French é and all) as her user name on a Windows laptop.
This caused no problems, except when time came to generate reformats, whereas the reformat process would hang when creating temporary files.
Turns out that if you sanitize the temporary directory name (by removing any non-ASCII characters) there is no hang, and reformats are generated as expected.
This I accomplished by changing line 72 in weasis-core/weasis-core-api/src/main/java/org/weasis/core/api/gui/util/AppProperties.java from
APP_TEMP_DIR = new File(tdir, "weasis-" + System.getProperty("user.name", "tmp") + "." //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + System.getProperty("weasis.source.id", UNKNOWN)); //$NON-NLS-1$ to
// need to cleanse the user name of any non-ascii charachters as otherwise temporary files get mis-placed
String userName = System.getProperty("user.name", "tmp");
userName = userName.replaceAll("[^\\x00-\\x7F]", "");
APP_TEMP_DIR = new File(tdir, "weasis-" + userName //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ System.getProperty("weasis.source.id", "unknown")); //$NON-NLS-1$ //$NON-NLS-2$
May this prevent hangs on your end too;)
Best
Logi
|