← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1838193-savedir into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1838193-savedir into lp:widelands.

Commit message:
Ensure save directory exists when checking for campaigns progress.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1838193 in widelands: "Single player campaigns no longer work"
  https://bugs.launchpad.net/widelands/+bug/1838193

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1838193-savedir/+merge/370829
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1838193-savedir into lp:widelands.
=== modified file 'src/ui_fsmenu/campaigns.cc'
--- src/ui_fsmenu/campaigns.cc	2019-04-24 06:05:50 +0000
+++ src/ui_fsmenu/campaigns.cc	2019-07-31 16:38:24 +0000
@@ -37,6 +37,7 @@
 Campaigns::Campaigns() {
 	// Load solved scenarios
 	std::unique_ptr<Profile> campvis;
+	g_fs->ensure_directory_exists(kSaveDir);
 	if (!(g_fs->file_exists(kCampVisFile))) {
 		// There is no campaigns.conf file - create one.
 		campvis.reset(new Profile(kCampVisFile.c_str()));


Follow ups