[Pkg-xfce-commits] r5659 - in desktop/trunk/thunar/debian: . patches
Yves-Alexis Perez
corsac at alioth.debian.org
Thu Apr 21 03:18:56 UTC 2011
Author: corsac
Date: 2011-04-21 15:18:49 +0000 (Thu, 21 Apr 2011)
New Revision: 5659
Added:
desktop/trunk/thunar/debian/patches/04_fix-maxpathlen-hurd.patch
Modified:
desktop/trunk/thunar/debian/changelog
desktop/trunk/thunar/debian/patches/series
Log:
* debian/patches:
- 04_fix-maxpathlen-hurd added, tentative patch to fix build failure on
GNU/Hurd.
Modified: desktop/trunk/thunar/debian/changelog
===================================================================
--- desktop/trunk/thunar/debian/changelog 2011-04-21 11:46:22 UTC (rev 5658)
+++ desktop/trunk/thunar/debian/changelog 2011-04-21 15:18:49 UTC (rev 5659)
@@ -1,3 +1,11 @@
+thunar (1.2.1-6) UNRELEASED; urgency=low
+
+ * debian/patches:
+ - 04_fix-maxpathlen-hurd added, tentative patch to fix build failure on
+ GNU/Hurd.
+
+ -- Yves-Alexis Perez <corsac at debian.org> Thu, 21 Apr 2011 10:54:23 +0200
+
thunar (1.2.1-5) unstable; urgency=low
* Upload to unstable.
Added: desktop/trunk/thunar/debian/patches/04_fix-maxpathlen-hurd.patch
===================================================================
--- desktop/trunk/thunar/debian/patches/04_fix-maxpathlen-hurd.patch (rev 0)
+++ desktop/trunk/thunar/debian/patches/04_fix-maxpathlen-hurd.patch 2011-04-21 15:18:49 UTC (rev 5659)
@@ -0,0 +1,52 @@
+commit 9b80264fa596e18468066ffb3f03804421f3872e
+Author: Yves-Alexis Perez <corsac at debian.org>
+Date: Thu Apr 21 16:59:40 2011 +0200
+
+ Use glib functions for get/set cwd (bug #7522).
+
+ MAXPATHLEN isn't defined on all platforms and there
+ are glib functions to handle the platform specific code.
+
+diff --git a/thunar/thunar-util.c b/thunar/thunar-util.c
+index b49a954..577bc27 100644
+--- a/thunar/thunar-util.c
++++ b/thunar/thunar-util.c
+@@ -57,6 +57,8 @@
+ #include <thunar/thunar-private.h>
+ #include <thunar/thunar-util.h>
+
++#include <glib.h>
++#include <glib/gstdio.h>
+
+
+ /**
+@@ -404,27 +406,11 @@ thunar_util_change_working_directory (const gchar *new_directory)
+
+ _thunar_return_val_if_fail (new_directory != NULL && *new_directory != '\0', NULL);
+
+- /* allocate a path buffer for the old working directory */
+- old_directory = g_malloc0 (sizeof (gchar) * MAXPATHLEN);
+-
+ /* try to determine the current working directory */
+-#ifdef G_PLATFORM_WIN32
+- if (_getcwd (old_directory, MAXPATHLEN) == NULL)
+-#else
+- if (getcwd (old_directory, MAXPATHLEN) == NULL)
+-#endif
+- {
+- /* working directory couldn't be determined, reset the buffer */
+- g_free (old_directory);
+- old_directory = NULL;
+- }
++ old_directory = g_get_current_dir();
+
+ /* try switching to the new working directory */
+-#ifdef G_PLATFORM_WIN32
+- if (_chdir (new_directory) != 0)
+-#else
+- if (chdir (new_directory) != 0)
+-#endif
++ if (g_chdir (new_directory) != 0)
+ {
+ /* switching failed, we don't need to return the old directory */
+ g_free (old_directory);
Modified: desktop/trunk/thunar/debian/patches/series
===================================================================
--- desktop/trunk/thunar/debian/patches/series 2011-04-21 11:46:22 UTC (rev 5658)
+++ desktop/trunk/thunar/debian/patches/series 2011-04-21 15:18:49 UTC (rev 5659)
@@ -1,3 +1,4 @@
01_use-system-tdb.patch
02_thunar-icon-naming-spec-compliance.patch
03_Don-t-interpret-file-display-names-as-format-strings.patch
+04_fix-maxpathlen-hurd.patch
More information about the Pkg-xfce-commits
mailing list