diff options
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; |