1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00

Added ctr.root, close #7, changed the max path length to 1024

ctr.root is not exactly the path to ctruLua.3dsx minus the file name, but is equivalent with HBL and $
(other launchers may work too, and it works perfectly with Citra), and is "romfs:/" if romfs is enabl$
This commit is contained in:
Firew0lf 2016-03-12 23:14:42 +01:00
parent 6a9fbbb133
commit e5467b663d
2 changed files with 19 additions and 3 deletions

View file

@ -40,7 +40,7 @@ const char* prefix_path(const char* path) {
char* prefix = "sdmc:";
#endif
char out[256];
char out[1024];
strcpy(out, prefix);
return strcat(out, path);
@ -156,9 +156,9 @@ Get the current working directory.
@treturn string the current working directory
*/
static int fs_getDirectory(lua_State *L) {
char cwd[256];
char cwd[1024];
lua_pushstring(L, getcwd(cwd, 256));
lua_pushstring(L, getcwd(cwd, 1024));
return 1;
}