Page 1 of 1

Bug with Spaces in Directory Path

Posted: Thu Sep 08, 2005 9:04 am
by ehathgepiurhe

I'm using XnView (1.80.3) to try and view images from my newsreader (Forte Agent v3.0). I have run into a problem with XnView and spaces in pathnames however. To reproduce:
-Open Agent
-Retrieve a message with an attachment (say .jpg)
-Make sure in Agent options (Tools-Options-URL and MIME Settings-MIME Types) that .jpg is set to open in XnView (note that though XnView does not have to be associated as the normal .jpg viewer, it makes no difference - the bug is the same). Because I use another image viewer for .jpg, and only want XnView to be used when opening them from Agent, I have XnView setup here, rather than using the association in XnView's options. Note also that if you install XnView into a place with a space (say in c:\Program Files\XnView), you have to put " around the path in the Agent option box to get the XnView icon recognised in Agent as the one to associate with .jpg - if you leave out the ", the bug will still occur, but instead of showing the XnView icon, .jpg's will just display with the generic Agent icon
-Once you've made sure that XnView will be the program opened, exit out of the Agent options and try to open the .jpg from the message (by double clicking on it). Temp files in Agent are stored in c:\Program Files\Agent\Data\Temp, and this is where XnView tries to open the .jpg from. Instead, you just get the message "Error opening the file <C:\Program>" Once you click Ok to this, you get the second part of the error popping up "Error opening the file <Files\Agent\Data\Temp\{name of file}.jpg>" Notice how the error is because of the space between Program and Files
-When you click Ok to this second part, XnView will open in its browser mode to the default directory.
-I thought at first this may be a Agent bug just flowing over to XnView, but my normal graphics viewer (IrfanView), works fine using the exact same steps, so it definitely is in XnView


Posted: Thu Sep 08, 2005 9:31 am
by ehathgepiurhe
Wow, get to answer my own post! :) If you put the line "C:\Program Files\XnView\xnview.exe" "%1" as the program to open with in the Agent options, instead of just "C:\Program Files\XnView\xnview.exe", XnView will work. Not sure if that means it is a bug or what though. Still, the problem still occurs even when you assoictae XnView with .jpg's and the full text (with the %1) is exactly what it puts in the Windows file association dialog - so I don't know why the same line works when you put it in Agent, but not if you just leave it up to Windows... :shock: