[Pkg-opt-media-team] [dvdisaster] 32/61: Allow ShowTextFile() to work with absolute path names.
Takaki Taniguchi
takaki at moszumanska.debian.org
Thu Feb 2 13:48:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
takaki pushed a commit to branch master
in repository dvdisaster.
commit c525e2fdf9227dc241c5b7370218539f9f4f0d70
Author: Carlos Maddela <e7appew at gmail.com>
Date: Thu Dec 22 12:12:28 2016 +1100
Allow ShowTextFile() to work with absolute path names.
---
.../patches/19-show-text-files-with-abs-path.patch | 44 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 45 insertions(+)
diff --git a/debian/patches/19-show-text-files-with-abs-path.patch b/debian/patches/19-show-text-files-with-abs-path.patch
new file mode 100644
index 0000000..c2b39fc
--- /dev/null
+++ b/debian/patches/19-show-text-files-with-abs-path.patch
@@ -0,0 +1,44 @@
+From: Carlos Maddela <e7appew at gmail.com>
+Date: Wed, 21 Dec 2016 09:08:05 +1100
+Subject: Allow ShowTextFile() to work with absolute path names.
+
+Description: Allow ShowTextFile() to work with absolute path names.
+Author: Carlos Maddela <e7appew at gmail.com>
+Origin: vendor
+Forwarded: no
+Last-Update: 2016-12-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+---
+ help-dialogs.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/help-dialogs.c b/help-dialogs.c
+index 3658bfc..9151d52 100644
+--- a/help-dialogs.c
++++ b/help-dialogs.c
+@@ -422,6 +422,24 @@ char *find_file(char *file, size_t *size, char *lang)
+ lang_suffix[1] = lang[1];
+ }
+
++ /* Test for absolute path first. */
++ if(*file == '/')
++ {
++ if(lang)
++ path = g_strdup_printf("%s.%s", file, lang_suffix);
++ else
++ path = g_strdup(file);
++
++ if(LargeStat(path, &stat_size))
++ {
++ *size = stat_size;
++ return path;
++ }
++
++ g_free(path);
++ return NULL;
++ }
++
+ /* Try file in bin dir */
+
+ if(Closure->binDir)
diff --git a/debian/patches/series b/debian/patches/series
index 88b0ce5..f0ec98c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,4 @@
16-remove-auto-build-of-doco-from-install-rule.patch
17-fix-all-but-deprecated-api-warnings.patch
18-update-copyright-in-about-dialog.patch
+19-show-text-files-with-abs-path.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opt-media/dvdisaster.git
More information about the Pkg-opt-media-team
mailing list