X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2Fplat.c;fp=linux%2Fplat.c;h=779d5b127123e7525624c41f628a95c982e069dc;hb=a23a278d1ef19ca2adbe23f56defe006d5433e32;hp=2842691e5e22d2e65be373eb10a26b27942ea8ea;hpb=68c85e2a0bc59b51c520e5dd97cd14fd795a9a5d;p=libpicofe.git diff --git a/linux/plat.c b/linux/plat.c index 2842691..779d5b1 100644 --- a/linux/plat.c +++ b/linux/plat.c @@ -41,7 +41,15 @@ int plat_is_dir(const char *path) return 0; } -static int plat_get_data_dir(char *dst, int len) +int plat_get_data_dir(char *dst, int len) +{ + if (len > 1) + strcpy(dst, "/"); + else *dst = 0; + return strlen(dst); +} + +static int plat_get_exe_dir(char *dst, int len) { #ifdef PICO_DATA_DIR memcpy(dst, PICO_DATA_DIR, sizeof PICO_DATA_DIR); @@ -65,7 +73,7 @@ static int plat_get_data_dir(char *dst, int len) int plat_get_skin_dir(char *dst, int len) { - int ret = plat_get_data_dir(dst, len); + int ret = plat_get_exe_dir(dst, len); if (ret < 0) return ret; @@ -90,7 +98,7 @@ int plat_get_root_dir(char *dst, int len) return ret; } #endif - return plat_get_data_dir(dst, len); + return plat_get_exe_dir(dst, len); } #ifdef __GP2X__