summaryrefslogtreecommitdiff
path: root/src/timezone.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/timezone.c')
-rwxr-xr-xsrc/timezone.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timezone.c b/src/timezone.c
index 8e912670..cc499097 100755
--- a/src/timezone.c
+++ b/src/timezone.c
@@ -187,7 +187,10 @@ static char *find_origin(void *src_map, struct stat *src_st,
subpath, d->d_name);
if (compare_file(src_map, src_st, pathname) == 0) {
- str = g_strdup_printf("%s/%s",
+ if (!subpath)
+ str = g_strdup(d->d_name);
+ else
+ str = g_strdup_printf("%s/%s",
subpath, d->d_name);
closedir(dir);
return str;