Opened 19 years ago

Closed 18 years ago

Last modified 6 years ago

#2638 closed defect (fixed)

GUI: trying to enter empty CD drive

Reported by: SF/clemty Owned by: cyxx
Priority: normal Component: GUI
Version: 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 18 years ago.
Possible fix

Download all attachments as: .zip

Change History (7)

comment:1 by fingolfin, 19 years ago

Owner: set to Kirben

comment:2 by fingolfin, 19 years ago

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

by cyxx, 18 years ago

Attachment: 1497725.diff added

Possible fix

comment:3 by cyxx, 18 years ago

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 by Kirben, 18 years ago

Owner: Kirben removed

comment:5 by Kirben, 18 years ago

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

comment:6 by digitall, 6 years ago

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