From cd2fcaf4ca338400ed8ee44566b9a767287efd69 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 18 Apr 2011 17:50:54 +0200 Subject: COMMON: Remove kInvalidPathError --- base/main.cpp | 2 +- common/error.cpp | 3 --- common/error.h | 2 -- engines/scumm/detection.cpp | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/base/main.cpp b/base/main.cpp index f45067ff1d..4dfed0f08c 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -131,7 +131,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const // Verify that the game path refers to an actual directory if (!(dir.exists() && dir.isDirectory())) - err = Common::kInvalidPathError; + err = Common::kPathNotDirectory; // Create the game engine if (err.getCode() == Common::kNoError) diff --git a/common/error.cpp b/common/error.cpp index eac8ba1ed1..86557ee2dc 100644 --- a/common/error.cpp +++ b/common/error.cpp @@ -40,8 +40,6 @@ static String errorToString(ErrorCode errorCode) { switch (errorCode) { case kNoError: return _s("No error"); - case kInvalidPathError: - return _s("Invalid path"); case kNoGameDataFoundError: return _s("Game data not found"); case kUnsupportedGameidError: @@ -54,7 +52,6 @@ static String errorToString(ErrorCode errorCode) { case kWritePermissionDenied: return _s("Write permission denied"); - // The following three overlap a bit with kInvalidPathError and each other. Which to keep? case kPathDoesNotExist: return _s("Path does not exist"); case kPathNotDirectory: diff --git a/common/error.h b/common/error.h index dcbe670bfc..f69ada9500 100644 --- a/common/error.h +++ b/common/error.h @@ -47,7 +47,6 @@ namespace Common { */ enum ErrorCode { kNoError = 0, ///< No error occurred - kInvalidPathError, ///< Engine initialization: Invalid game path was passed kNoGameDataFoundError, ///< Engine initialization: No game data was found in the specified location kUnsupportedGameidError, ///< Engine initialization: Gameid not supported by this (Meta)Engine kUnsupportedColorMode, ///< Engine initialization: Engine does not support backend's color mode @@ -56,7 +55,6 @@ enum ErrorCode { kReadPermissionDenied, ///< Unable to read data due to missing read permission kWritePermissionDenied, ///< Unable to write data due to missing write permission - // The following three overlap a bit with kInvalidPathError and each other. Which to keep? kPathDoesNotExist, ///< The specified path does not exist kPathNotDirectory, ///< The specified path does not point to a directory kPathNotFile, ///< The specified path does not point to a file diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 87ec7b85a4..6db3ea740a 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -994,7 +994,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co Common::FSList fslist; Common::FSNode dir(ConfMan.get("path")); if (!dir.isDirectory()) - return Common::kInvalidPathError; + return Common::kPathNotDirectory; if (!dir.getChildren(fslist, Common::FSNode::kListFilesOnly)) return Common::kNoGameDataFoundError; -- cgit v1.2.3