patch fix.
This commit is contained in:
parent
bc9dd3c808
commit
373005e21f
@ -1,8 +1,6 @@
|
||||
diff --git a/src/basedir.c b/src/basedir.c
|
||||
index 68ab879..417d270 100644
|
||||
--- a/src/basedir.c
|
||||
+++ b/src/basedir.c
|
||||
@@ -142,21 +142,18 @@ static void xdgFreeStringList(char** list)
|
||||
--- a/src/basedir.c 2019-04-01 17:11:52.293770606 +0200
|
||||
+++ b/src/basedir.c 2019-04-01 14:03:23.465154736 +0200
|
||||
@@ -142,26 +142,22 @@
|
||||
/** Free all data in the cache and set pointers to null. */
|
||||
static void xdgFreeData(xdgCachedData *cache)
|
||||
{
|
||||
@ -27,14 +25,13 @@ index 68ab879..417d270 100644
|
||||
free(cache->cacheHome);
|
||||
cache->cacheHome = 0;
|
||||
}
|
||||
if (cache->runtimeDirectory) {
|
||||
free(cache->runtimeDirectory);
|
||||
cache->runtimeDirectory = 0;
|
||||
}
|
||||
xdgFreeStringList(cache->searchableDataDirectories);
|
||||
cache->searchableDataDirectories = 0;
|
||||
xdgFreeStringList(cache->searchableConfigDirectories);
|
||||
@@ -322,8 +323,12 @@ static int xdgUpdateHomeDirectories(xdgCachedData* cache)
|
||||
- if (cache->runtimeDirectory)
|
||||
- {
|
||||
+ if (cache->runtimeDirectory) {
|
||||
free(cache->runtimeDirectory);
|
||||
cache->runtimeDirectory = 0;
|
||||
}
|
||||
@@ -327,8 +323,12 @@
|
||||
|
||||
if (cache->dataHome && cache->configHome && cache->cacheHome) return TRUE;
|
||||
|
||||
@ -49,7 +46,7 @@ index 68ab879..417d270 100644
|
||||
|
||||
/* Allocate maximum needed for any of the 3 default values */
|
||||
if (!(value = (char*)malloc((homelen = strlen(homeenv))+extralen))) return FALSE;
|
||||
@@ -609,8 +614,8 @@ const char * const * xdgSearchableDataDirectories(xdgHandle *handle)
|
||||
@@ -614,8 +614,8 @@
|
||||
else
|
||||
{
|
||||
char *datahome = (char*)xdgDataHome(NULL);
|
||||
@ -60,7 +57,7 @@ index 68ab879..417d270 100644
|
||||
free(datahome);
|
||||
return (const char * const *)datadirs;
|
||||
}
|
||||
@@ -629,8 +634,8 @@ const char * const * xdgSearchableConfigDirectories(xdgHandle *handle)
|
||||
@@ -634,8 +634,8 @@
|
||||
else
|
||||
{
|
||||
char *confighome = (char*)xdgConfigHome(NULL);
|
||||
@ -71,10 +68,8 @@ index 68ab879..417d270 100644
|
||||
free(confighome);
|
||||
return (const char * const *)configdirs;
|
||||
}
|
||||
diff --git a/tests/testdump.c b/tests/testdump.c
|
||||
index 2e6e0fb..9b0ce9a 100644
|
||||
--- a/tests/testdump.c
|
||||
+++ b/tests/testdump.c
|
||||
--- a/tests/testdump.c 2012-01-22 02:29:11.000000000 +0100
|
||||
+++ b/tests/testdump.c 2019-04-01 14:03:23.463154767 +0200
|
||||
@@ -24,27 +24,56 @@
|
||||
|
||||
#include <basedir.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: libxdg-basedir
|
||||
Version: 1.2.0
|
||||
Release: 18%{?dist}
|
||||
Release: 19%{?dist}
|
||||
Summary: Implementation of the XDG Base Directory Specifications
|
||||
|
||||
License: MIT
|
||||
@ -81,6 +81,9 @@ make check USE_VALGRIND=1
|
||||
%doc doc/html/
|
||||
|
||||
%changelog
|
||||
* Mon Apr 01 2019 Gwyn Ciesla <gwync@protonmail.com> - 1.2.0-19
|
||||
- Patch correction.
|
||||
|
||||
* Mon Apr 01 2019 Gwyn Ciesla <gwync@protonmail.com> - 1.2.0-18
|
||||
- Patch to handle undefined homedir, BZ 1694706.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user