pfumagalli / couldit-autoexport

Automatically exported from code.google.com/p/couldit-autoexport
Other
0 stars 1 forks source link

AutoExport doesn't write in the correct directory on Windows #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
On 8 May 2006, at 21:02, Hernan Cunico wrote: 

Hi Pier, 
just in case you fint it useful. The field validation for the "Export root 
directory:" works OK, the 
plugin configuration will alert you if that directory does not exist so the 
problems must be 
somewhere else, not in the parsing 

BTW, I did some customization to the template but I am not being able to remove 
the "Added 
by/last edited by" info from the export. I am trying to leave the dynamic 
confluence pages intact 
and just modify the HTML exports. Any idea if I can get rid of that particular 
line? 

Thanks in advance 

Cheers! 
Hernan 

Original issue reported on code.google.com by ian...@gmail.com on 29 Nov 2007 at 12:46

GoogleCodeExporter commented 9 years ago
Other info that might be useful & related... 

Confluence installed in D:\Java\Tools\Confluence-2.1.5a Created 
D:\Java\Tools\Confluence_Export & set as 
plugin destination (was accepted, whereas a test trying 
D:\Java\Confluence_Export was detected as non-
existent). 

Doing an export gave the right msgs but nothing in the folder. After a while, 
checked C:\ and found that 
C:\Java\Tools\Confluence_Export had been created and populated with the 
exported space. 

/Gwyn

Original comment by ian...@gmail.com on 29 Nov 2007 at 12:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've had this problem too, but it can be solved by specifying your "Export root 
directory" in a particular way. You need to include a slash as a prefix like 
this:
/D:/Java/Tools/Confluence_Export

Note that when the path is displayed, after you click Save Changes, that slash 
disappears. However it appears to be stored correctly and is actually used by 
autoexport.

*** Some background ***

I think there is a flaw in the class 
it.could.confluence.autoexport.LocationManager — it is allowing file:// URLs 
that are invalid in Windows.

In your example above, autoexport would have been generating URLs like this:
file://D:\Java\Tools\Confluence_Export/
but the correct URL in Windows would actually be:
file:///D:/Java/Tools/Confluence_Export/

So by putting in the initial slash, the URL is generated correctly. This 
article explains more about file URLs in Windows: 
http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx

Of course it would be better to fix autoexport to handle this properly. I might 
try creating a patch for the autoexport code to correctly handle Windows 
paths... if I get a chance... 

Original comment by charlesg...@optusnet.com.au on 25 Oct 2010 at 8:20