Page 1 of 1

Crash when directory ends with space

Posted: Mon Aug 22, 2011 10:59 am
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.

Re: Crash when directory ends with space

Posted: Tue Aug 23, 2011 1:44 pm
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

Re: Crash when directory ends with space

Posted: Tue Aug 23, 2011 6:50 pm
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.

Re: Crash when directory ends with space

Posted: Thu Oct 27, 2011 12:27 pm
by xnview
How do you create such folder?

Re: Crash when directory ends with space

Posted: Thu Oct 27, 2011 9:03 pm
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.

Re: Crash when directory ends with space

Posted: Wed Nov 02, 2011 3:00 pm
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...