diff options
author | José Bollo <jose.bollo@iot.bzh> | 2015-12-08 14:44:38 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2015-12-08 14:44:38 +0100 |
commit | 381842f4c264e5946ad964f43608f7e543fbcb19 (patch) | |
tree | 8da99034ead205ca52c0ade46da51e25d6f9a657 /wgt-locales.c | |
parent | 7fc1ab01c2309d3078e3d66cfff05bf27fdad26f (diff) |
work relatively to a root directory
Change-Id: I7cbb96bd3f699092ddfded8cc8893ec780a97d8c
Diffstat (limited to 'wgt-locales.c')
-rw-r--r-- | wgt-locales.c | 20 |
1 files changed, 18 insertions, 2 deletions
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 <string.h> @@ -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; |