From a84ee718c1be1015db0a6aae5c7719f2c5bc14dc Mon Sep 17 00:00:00 2001 From: akshayaurora Date: Mon, 25 Jul 2016 20:48:52 +0530 Subject: [PATCH] return `abspath` in `resource_find`. Seems to be needed when android uses apkexpansion --- kivy/resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy/resources.py b/kivy/resources.py index ebb094be7..2181dac1c 100644 --- a/kivy/resources.py +++ b/kivy/resources.py @@ -30,7 +30,7 @@ images and icons. __all__ = ('resource_find', 'resource_add_path', 'resource_remove_path') -from os.path import join, dirname, exists +from os.path import join, dirname, exists, abspath from kivy import kivy_data_dir from kivy.utils import platform from kivy.logger import Logger @@ -52,11 +52,11 @@ def resource_find(filename): if filename[:8] == 'atlas://': return filename if exists(filename): - return filename + return abspath(filename) for path in reversed(resource_paths): output = join(path, filename) if exists(output): - return output + return abspath(output) if filename[:5] == 'data:': return filename return None