Opened 13 years ago

Closed 13 years ago

Last modified 10 months ago

#2638 closed defect (fixed)

GUI: trying to enter empty CD drive

Reported by: SF/clemty Owned by: cyxx
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

SVN May 30 Win32

trying to add a game on another drive I moved up till I
got the drive letter "directories", tried to enter K:
which is my (empty) DVD drive

now K:\ appears in the heading, implying that I
successfully entered that directory, even though I
still get the list of drive letters

maybe only print the current directory if ScummVM
actually managed to enter it?

Ticket imported from: #1497725. Ticket imported from: bugs/2638.

Attachments (1)

1497725.diff (1.0 KB) - added by cyxx 13 years ago.
Possible fix

Download all attachments as: .zip

Change History (7)

comment:1 Changed 13 years ago by fingolfin

Owner: set to Kirben

comment:2 Changed 13 years ago by fingolfin

We do not actually change the current directory when browsing files... This
sounds more like a flaw in the windows FSNode code...

Changed 13 years ago by cyxx

Attachment: 1497725.diff added

Possible fix

comment:3 Changed 13 years ago by cyxx

Looks like there's a problem in the BrowserDialog class.

The return code of FilesystemNode::listDir isn't checked at
all. In this case, the FSList passed as the argument isn't
cleared and the BrowserClass redraws the file list with the
contents of the previous result of listDir.

Not sure what is the best solution :
- always clear the FSList in FilesystemNode::listDir(), even
in case of failure
- adapt the BrowserDialog class to disable browsing to the
'bad directory' (ie. don't do any graphics update)
- adapt the BrowserDialog class to check the return value
and draw a empty list (like it was in version 0.8.2) (*)

Patch attached - third solution (*)

comment:4 Changed 13 years ago by Kirben

Owner: Kirben deleted

comment:5 Changed 13 years ago by Kirben

Component: --Unset--
Owner: set to cyxx
Resolution: fixed
Status: newclosed

comment:6 Changed 10 months ago by digitall

Component: --Unset--GUI
Note: See TracTickets for help on using tickets.