[higan] 01/04: Write new config files to configpath().

Tobias Hansen thansen at moszumanska.debian.org
Sun Jun 26 13:13:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository higan.

commit d84cd0125bfba1974c02220dd5e97a4204d5e214
Author: Tobias Hansen <thansen at debian.org>
Date:   Sun Jun 26 12:56:12 2016 +0100

    Write new config files to configpath().
---
 debian/changelog                   |  1 +
 debian/patches/create_config.patch | 16 ++++++++++++++++
 debian/patches/series              |  1 +
 3 files changed, 18 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2ad3b9a..9f9f556 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,7 @@ higan (098-1) UNRELEASED; urgency=medium
   * New patches:
     - use_sharedpath.patch
     - ignore_manifests_by_default.patch
+    - create_config.patch
   * Fix .desktop file syntax. (Closes: #812482)
   * Update homepage URL. (Closes: #808788)
   * Bump Standards-Version.
diff --git a/debian/patches/create_config.patch b/debian/patches/create_config.patch
new file mode 100644
index 0000000..e04536d
--- /dev/null
+++ b/debian/patches/create_config.patch
@@ -0,0 +1,16 @@
+Description: Always create new config file in configpath
+ Using locate() can lead to an attempt to write a new config file
+ to a directory without write permission. The correct path is
+ configpath (~/.config/higan).
+Author: Tobias Hansen <thansen at debian.org>
+
+--- a/higan/target-tomoko/configuration/configuration.cpp
++++ b/higan/target-tomoko/configuration/configuration.cpp
+@@ -48,5 +48,6 @@
+ }
+ 
+ auto Settings::quit() -> void {
+-  file::write(locate("settings.bml"), BML::serialize(*this));
++  directory::create({configpath(), "higan/"});
++  file::write({configpath(), "higan/", "settings.bml"}, BML::serialize(*this));
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 0b4ee78..f7921fd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ use-XDG_CONFIG_HOME.patch
 find_cairo.patch
 use_sharedpath.patch
 ignore_manifests_by_default.patch
+create_config.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/higan.git



More information about the Pkg-games-commits mailing list