[vlc-commits] src/android: implement config_GetSysPath
Zhao Zhili
git at videolan.org
Fri May 18 13:27:40 CEST 2018
vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Fri May 18 14:00:52 2018 +0800| [32567e5d9d7426875190e59acf4a45404afbfca3] | committer: Thomas Guillem
src/android: implement config_GetSysPath
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32567e5d9d7426875190e59acf4a45404afbfca3
---
src/android/specific.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/src/android/specific.c b/src/android/specific.c
index bb45f28e16..c8a0e6756e 100644
--- a/src/android/specific.c
+++ b/src/android/specific.c
@@ -302,6 +302,29 @@ char *config_GetUserDir (vlc_userdir_t type)
return NULL;
}
+char *config_GetSysPath(vlc_sysdir_t type, const char *filename)
+{
+ char *dir = NULL;
+
+ switch (type)
+ {
+ case VLC_LIB_DIR:
+ dir = config_GetLibDir();
+ break;
+ default:
+ break;
+ }
+
+ if (filename == NULL || dir == NULL)
+ return dir;
+
+ char *path;
+ if (unlikely(asprintf(&path, "%s/%s", dir, filename) == -1))
+ path = NULL;
+ free(dir);
+ return path;
+}
+
/**
* Determines the network proxy server to use (if any).
*
More information about the vlc-commits
mailing list