Can't open file when path contains space character

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

Post Reply
Petra.T

Can't open file when path contains space character

Post by Petra.T »

Don't know if this is a bug or some problem with my PC, but when I try to open a picture file from Total Commander or Explorer and it's path contains any space char, the program fails. It shows a message box: "Error opening the file <path_only_to_first_space>" and then opens the browser window.

Opening such file direct from browser window is OK.

XnView version: 1.80.1
OS: WinXP Home
ckit
XnThusiast
Posts: 2557
Joined: Tue Feb 17, 2004 1:11 am
Location: Cabarlah, Australia

Post by ckit »

I've had this problem before, just re-register the files in XnView again.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz
Windows 11 Pro x64 23H2, PowerToys and Wintoys
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow
Contact:

Post by ckv »

This happen because the file association is false or incomplete

Code: Select all

This is the standard file association what should work with every aplication
"C:\Program files\XnView\xnview.exe" "%1"

%1 = pointer to the filename
If the file pointter isn't in quotes or the pointter is missing, some programs can't open the files right.
It's all about how well the program handels parameters.

At least XnView 1.80.1 creates the standard file associations so the bug is in the program what created the file associations (older XnView perhaps)
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

A joke of 98 SE…

Post by Clo »

:arrow: ckv

:) Hello !
…If the file pointer isn't in quotes…

- Right, and this is a well-known bug of 98 SE. That happens by "crisis periods", for some unknown reasons,
the quotes of "%1" are removed, then you get a cascade of error messages like : "Can't open <first_part>", (space in path / name) "Can't open <second_part>" and so on if the path and the file-name both contain spaces…
• Personally, I correct this remaking the right association in Total Commander. But it can stay correct for one hour or three months, impossible to know…
- Under XP-Pro, some quotes are originally missing from the Win installation, i. e. for *.TXT and «Notepad», that is not very clever ! However, when fixed, they are no longer removed, as far as I could see…

:mrgreen: Kind regards,
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow
Contact:

Re: A joke of 98 SE…

Post by ckv »

Clo wrote:But it can stay correct for one hour or three months, impossible to know…
It stays correct until some program takes the association or win98 crashes and "fix" the registery by recovering latest registery backup. At least I think so...
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

Yes and no---

Post by Clo »

>> ckv
It stays correct until some program takes the association or win98 crashes…
:) Indeed, I thought to that too, but isn't the only cause : something is wrong in the saving of a fixed association in <win.ini> by Windows.
- I said : “One hour…” but it can be 5 minutes or less as well, even rebooting the PC, while the quotes have been restored ! :|

:mrgreen: KR
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow
Contact:

Post by ckv »

Oh. This old OS works in many mysterious ways. :mrgreen:
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
Post Reply