[libgames-support] Do not require games to have preexisting data dir
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgames-support] Do not require games to have preexisting data dir
- Date: Mon, 15 Feb 2016 03:19:24 +0000 (UTC)
commit 9417e61bf0a0430006456a5cff9e6dbdea5ed302
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Feb 14 21:18:25 2016 -0600
Do not require games to have preexisting data dir
Don't throw an error during scores import if the game's local data dir
does not exist.
games/scores/importer.vala | 2 +-
tests/test-scores.vala | 10 ----------
2 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/games/scores/importer.vala b/games/scores/importer.vala
index 6e559f8..f451cc9 100644
--- a/games/scores/importer.vala
+++ b/games/scores/importer.vala
@@ -75,7 +75,7 @@ public abstract class Importer : Object
try
{
- new_dir.make_directory ();
+ new_dir.make_directory_with_parents ();
importOldScores (context, new_dir);
}
catch (Error e)
diff --git a/tests/test-scores.vala b/tests/test-scores.vala
index 2fa8e39..f8fdf1f 100644
--- a/tests/test-scores.vala
+++ b/tests/test-scores.vala
@@ -254,16 +254,6 @@ private void test_import_from_history_file ()
private void test_import_from_nonexistent_history_file ()
{
- try
- {
- var test_directory = File.new_for_path (get_test_directory_name ());
- test_directory.make_directory_with_parents ();
- }
- catch (Error e)
- {
- error (e.message);
- }
-
(void) new Context.with_importer (
"libgames-support-test",
"",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]