From 381842f4c264e5946ad964f43608f7e543fbcb19 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 8 Dec 2015 14:44:38 +0100 Subject: work relatively to a root directory Change-Id: I7cbb96bd3f699092ddfded8cc8893ec780a97d8c --- wgt-locales.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'wgt-locales.c') diff --git a/wgt-locales.c b/wgt-locales.c index d985b64..9b97cc4 100644 --- a/wgt-locales.c +++ b/wgt-locales.c @@ -1,3 +1,19 @@ +/* + Copyright 2015 IoT.bzh + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #define _GNU_SOURCE #include @@ -86,14 +102,14 @@ char *locales_locate_file(const char *filename) errno = EINVAL; return NULL; } - if (!access(path, F_OK)) { + if (widget_has(path)) { result = strdup(path); if (!result) errno = ENOMEM; return result; } } - if (access(filename, F_OK)) { + if (widget_has(filename)) { result = strdup(filename); if (!result) errno = ENOMEM; -- cgit 1.2.3-korg