[Scummvm-cvs-logs] scummvm master -> 97a2a9c622332ab6d5a8850b5b03a9cbf046f67a

sev- sev at scummvm.org
Mon May 16 10:18:04 CEST 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a406ce6d55 COMMON: Fix wrong error message
97a2a9c622 Merge pull request #710 from vandalo/master


Commit: a406ce6d557a79a32b3d8b7f6c60971806cd06a5
    https://github.com/scummvm/scummvm/commit/a406ce6d557a79a32b3d8b7f6c60971806cd06a5
Author: vandalo (ferrancomarosell at gmail.com)
Date: 2016-04-16T17:59:20+02:00

Commit Message:
COMMON: Fix wrong error message

The error message was not correct.

When you add a game data dir to launcher and after do this
rename game data dir the error was wrong.
It said that the "path wasn't a directory",
the expected error message was
"Path does not exists" because we had changed.

How to solve this:
We split in two the validation of the path, first
we check if it's a existing path and then if the path is a directory.

if (!dir.exists())
	err = Common::kPathDoesNotExist;
else if (!dir.isDirectory())
	err = Common::kPathNotDirectory;

Solve Bug: 6765 Wrong error code if directory missing

Changed paths:
    base/main.cpp



diff --git a/base/main.cpp b/base/main.cpp
index ff441df..96e2765 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -148,8 +148,11 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
 #endif
 
 	// Verify that the game path refers to an actual directory
-	if (!(dir.exists() && dir.isDirectory()))
+        if (!dir.exists()) {
+		err = Common::kPathDoesNotExist;
+        } else if (!dir.isDirectory()) {
 		err = Common::kPathNotDirectory;
+        }
 
 	// Create the game engine
 	if (err.getCode() == Common::kNoError) {


Commit: 97a2a9c622332ab6d5a8850b5b03a9cbf046f67a
    https://github.com/scummvm/scummvm/commit/97a2a9c622332ab6d5a8850b5b03a9cbf046f67a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-16T10:18:00+02:00

Commit Message:
Merge pull request #710 from vandalo/master

COMMON: Fix wrong warning message

Changed paths:
    base/main.cpp









More information about the Scummvm-git-logs mailing list