Opened 14 years ago

Closed 14 years ago

Last modified 13 months ago

#2601 closed defect (fixed)

ALL: Misleading warning message

Reported by: eriktorbjorn Owned by: fingolfin
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

Latest SVN snapshot

As an experiment, I tried removing MI2 from my configuration file, added symbolic links from my current directory to the data files, and then tried to start MI2. The following messages appeared:

Looking for monkey2 Trying to start game 'Monkey Island 2: LeChuck's Revenge' WARNING: No path was provided. Assuming the data files are in the current directory! WARNING: ScummEngine: unable to locate game data at path '/'! WARNING: Failed to instantiate engine for target monkey2!

Since '/' was not my current path, it seems the warning message about assuming the files are in the current directory is wrong. Or the message is right, and ScummVM's behaviour is wrong. I'm not sure which.

Ticket imported from: #1485941. Ticket imported from: bugs/2601.

Change History (7)

comment:1 by eriktorbjorn, 14 years ago

Owner: set to fingolfin

comment:2 by fingolfin, 14 years ago

The problem is this: When no value is set for "path", then Engine_SCUMM_create uses the default "FilesystemNode", and just assumes that this will create a node pointing to the current dir. That used to be the case for the POSIX fs code, but isn't anymore (it was a bad hack in the first place).

So, to change this, we need a new way to access the "current directory" -- a notion which doesn't make sense on all our target systems, however...

I hope to be able to spend some time on this during the coming weekend. One idea would be to radically change the behavior of the default FilesystemNode constructor -- let it create an *invalid* node. Then, we add a custom way to access a node representing the current dir. We either change the specification of FilesystemNode(String), letting it return a node pointing to the current dir if the string is empty or equal to ".". Alternatively, we could add a "FilesystemNode::getCurrentDir()" static method.

The advantage of just intepreting an empty string as meaning "current dir" is that we can simply use FilesystemNode dir(ConfMan.get("path")); w/o any further check on whether "path" has been set -- if it hasn't been, this get() call will return an empty string and all proceeds as it should.

comment:3 by sev-, 14 years ago

Yes, feature with "" or "." looks better to me.

comment:4 by fingolfin, 14 years ago

Status: newclosed

comment:5 by fingolfin, 14 years ago

OK, I implemented the proposed changes to FilesystemNode. As a result, using the "current directory" works again, at least for systems using the POSIX FS module. Other modules still use the root dir now, it's up to the porters to change this. I am going to write an email about this to scummvm-devel.

comment:6 by fingolfin, 14 years ago

Resolution: fixed

comment:7 by digitall, 13 months ago

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