From d016c353c5f2f87278e244ec6418c87d681925b1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 3 May 2006 20:43:26 +0000 Subject: Changed FilesystemNode::listDir to return a bool indicating its success (or failure) svn-id: r22315 --- gui/launcher.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/launcher.cpp b/gui/launcher.cpp index af7f67d997..86e8ad926b 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -576,7 +576,11 @@ void LauncherDialog::addGame() { if (_browser->runModal() > 0) { // User made his choice... FilesystemNode dir(_browser->getResult()); - FSList files = dir.listDir(FilesystemNode::kListAll); + FSList files; + if (!dir.listDir(files, FilesystemNode::kListAll)) { + error("browser returned a node that is not a directory: '%s'", + dir.path().c_str()); + } // ...so let's determine a list of candidates, games that // could be contained in the specified directory. -- cgit v1.2.3