This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch main
in repository eternity.
View the commit online.
commit 3fbc59a54c40d4d8e38089cefc621ec5821e938d
Author: Vincent Torri <[email protected]>
AuthorDate: Sun Nov 22 10:37:29 2026 +0100
fix eternity_realpath() usage
---
src/lib/eternity_world.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/lib/eternity_world.c b/src/lib/eternity_world.c
index 24117ed..b2f0e24 100644
--- a/src/lib/eternity_world.c
+++ b/src/lib/eternity_world.c
@@ -68,7 +68,7 @@ _eternity_world_coordinate(const char *text, int digits)
Eina_Bool
eternity_world_location_get(const char *zone, double *latitude, double *longitude)
{
- char resolved[PATH_MAX], local_zone[256];
+ char local_zone[256];
const char *tz;
FILE *file;
Eina_Bool ok;
@@ -81,8 +81,14 @@ eternity_world_location_get(const char *zone, double *latitude, double *longitud
{
tz = getenv("TZ");
if (tz && tz[0]) zone = tz[0] == ':' ? tz + 1 : tz;
- else if (eternity_realpath("/etc/localtime", resolved) && strstr(resolved, "/zoneinfo/"))
- zone = strstr(resolved, "/zoneinfo/") + strlen("/zoneinfo/");
+ else
+ {
+ char *resolved;
+ resolved = eternity_realpath("/etc/localtime");
+ if (resolved && strstr(resolved, "/zoneinfo/"))
+ zone = strstr(resolved, "/zoneinfo/") + strlen("/zoneinfo/");
+ free(resolved);
+ }
else
{
file = fopen("/etc/timezone", "r");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.