Crash when directory ends with space

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

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
dma_k
Posts: 100
Joined: Tue Apr 14, 2009 8:50 am

Crash when directory ends with space

Post by dma_k »

Dear xnview developers,

I have noticed that xnview v1.98.2 does not correctly behave in case the directory name ends with space (e.g. "test "). In this case it is not possible to select this directory (the way out it to right-click and rename it). However after selecting the parent directory of "test ", xnview crashes with following message:

Image

Let me know, how to generate better crash report.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: Crash when directory ends with space

Post by marsh »

There is only one author as far as I know...

Trailing spaces were unconventional file/folder names on Win2k. Perhaps this remains true for all their OS.
Offsite:
Reserved characters and words
Forum:
Crashes while renaming a folder
User avatar
dma_k
Posts: 100
Joined: Tue Apr 14, 2009 8:50 am

Re: Crash when directory ends with space

Post by dma_k »

marsh, thanks a lot. You've found very relative issue. Alltogather:
  • Adding a normal space (no tricks with 0xA0) works perfectly OK in WinXP and Win7. Perhaps that is forbidden, but OS allows to create such directories (I've tried my file manager and xnview). CMD currently can hardly deal with it, but DIR can recurse them:

    Code: Select all

    C:\TEMP> dir /b /s
    C:\TEMP\aaa
    C:\TEMP\aaa   \bbb
    
  • xnview does not crash when such directory is created, but you can't select it. It crashes later, perhaps when gets the notification that i's contents has changed or reads the contents of parent directory.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Crash when directory ends with space

Post by xnview »

How do you create such folder?
Pierre.
User avatar
dma_k
Posts: 100
Joined: Tue Apr 14, 2009 8:50 am

Re: Crash when directory ends with space

Post by dma_k »

xnview wrote:How do you create such folder?
Good question. I used Far Manager for that. From one side neither command line tool (mkdir) nor explorer allow to create such folders. But Win API allows it, so there might be software that can create it.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Crash when directory ends with space

Post by xnview »

dma_k wrote:
xnview wrote:How do you create such folder?
Good question. I used Far Manager for that. From one side neither command line tool (mkdir) nor explorer allow to create such folders. But Win API allows it, so there might be software that can create it.
Strange via API, last space is not used...
Pierre.
Post Reply