fgiova / jodconverter

Automatically exported from code.google.com/p/jodconverter
0 stars 0 forks source link

OOo profile dir cannot be deleted in some special cases #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just had this issue where OfficeProcess.deleteProfileDir() fails with a
"File does not exist" warning.

This happens because of a waw file in user/gallery - probably incuded in
some presentation document - with a file name containing special characters.

Looks like directory.listFiles() returns that file name, but then
file.exists() cannot find it. This happened on Linux, with a file name
probably encoded in a Windows charset.

Not sure where exactly the problem lies (Commons-IO, Java, OOo?) but it's a
big issue because if the OOo profile becomes corrupted then even restarting
the OOo process doesn't fix it.

Original issue reported on code.google.com by mirko.na...@gmail.com on 9 Aug 2009 at 11:04

GoogleCodeExporter commented 9 years ago
Looks the same issue as

http://www.javakb.com/Uwe/Forum.aspx/java-programmer/31142/file-isFile-returns-f
alse-on-special-character-files

but I couldn't reproduce it on my laptop.

As a workaround, if the old profileDir cannot be deleted we can at least try to
rename it, so the new OOo process can use a fresh profileDir anyway.

Fixed in r151

Original comment by mirko.na...@gmail.com on 9 Aug 2009 at 1:36

GoogleCodeExporter commented 9 years ago

Original comment by mirko.na...@gmail.com on 27 Mar 2011 at 1:20