From fc34cb3bd38dd46acc606cbe290cd851cf57b171 Mon Sep 17 00:00:00 2001 From: Oystein Eftevaag Date: Tue, 17 Feb 2009 21:02:47 +0000 Subject: When adding games from a directory the user had no permissions to, instead of exiting with an error we'll (for normal adds) show an error message and (for mass adds) just continue in the list. svn-id: r38448 --- gui/launcher.cpp | 5 +++-- gui/massadd.cpp | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 4748ac5468..af15d9f369 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -658,8 +658,9 @@ void LauncherDialog::addGame() { Common::FSNode dir(_browser->getResult()); Common::FSList files; if (!dir.getChildren(files, Common::FSNode::kListAll)) { - error("browser returned a node that is not a directory: '%s'", - dir.getPath().c_str()); + MessageDialog alert("ScummVM couldn't open the specified directory!"); + alert.runModal(); + return; } // ...so let's determine a list of candidates, games that diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 642e4c713a..1b1f3f7ff0 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -155,8 +155,7 @@ void MassAddDialog::handleTickle() { Common::FSList files; if (!dir.getChildren(files, Common::FSNode::kListAll)) { - error("browser returned a node that is not a directory: '%s'", - dir.getPath().c_str()); + continue; } // Run the detector on the dir -- cgit v1.2.3