mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-29 14:42:26 +00:00
Removed FilesystemNode::isValid (leaving it up to the porters to decide whether to remove their isValid code or not)
svn-id: r22317
This commit is contained in:
parent
b67c30f6c8
commit
05f6adbbd9
@ -85,7 +85,6 @@ public:
|
||||
virtual ~AbstractFilesystemNode() {}
|
||||
|
||||
virtual String displayName() const = 0;
|
||||
virtual bool isValid() const = 0;
|
||||
virtual bool isDirectory() const = 0;
|
||||
virtual String path() const = 0;
|
||||
virtual bool listDir(AbstractFSList &list, ListMode mode) const = 0;
|
||||
|
@ -121,12 +121,6 @@ Common::String FilesystemNode::displayName() const {
|
||||
return _realNode->displayName();
|
||||
}
|
||||
|
||||
bool FilesystemNode::isValid() const {
|
||||
if (_realNode == 0)
|
||||
return false;
|
||||
return _realNode->isValid();
|
||||
}
|
||||
|
||||
bool FilesystemNode::isDirectory() const {
|
||||
if (_realNode == 0)
|
||||
return false;
|
||||
|
@ -121,16 +121,6 @@ public:
|
||||
*/
|
||||
virtual String displayName() const;
|
||||
|
||||
/**
|
||||
* Is this node valid? Returns true if the file/directory pointed
|
||||
* to by this node exists, false otherwise.
|
||||
*
|
||||
* @todo Maybe rename this to exists() ? Or maybe even distinguish between
|
||||
* the two? E.g. a path may be non-existant but valid, while another might
|
||||
* be completely invalid). But do we ever need to make that distinction?
|
||||
*/
|
||||
virtual bool isValid() const;
|
||||
|
||||
/**
|
||||
* Is this node pointing to a directory?
|
||||
* @todo Currently we assume that a valid node that is not a directory
|
||||
|
@ -170,7 +170,7 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String &
|
||||
if (ConfMan.hasKey("path")) {
|
||||
Common::String path(ConfMan.get("path"));
|
||||
FilesystemNode dir(path);
|
||||
if (!dir.isValid() || !dir.isDirectory()) {
|
||||
if (!dir.isDirectory()) {
|
||||
warning("Game directory does not exist (%s)", path.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ bool File::exists(const String &filename) {
|
||||
// First try to find the file it via a FilesystemNode (in case an absolute
|
||||
// path was passed). But we only use this to filter out directories.
|
||||
FilesystemNode file(filename);
|
||||
if (file.isValid() && file.isDirectory())
|
||||
if (file.isDirectory())
|
||||
return false;
|
||||
|
||||
// Next, try to locate the file by *opening* it in read mode. This has
|
||||
|
Loading…
x
Reference in New Issue
Block a user