|
Use real path instead of archive path (PhysFS) |
jmasterx
Member #11,410
October 2009
|
I've run into a small issue. I use PhysFS as the file interface to load all my data and so forth. However, now I have a file that I need to read and write to on the hard drive. I also have a directory to make on the user path. However, it appears that PhysFS has control and trying to make a directory in c:/users/.... is failing because PhysFS is looking for it in my archive (I think). How can I get normal paths and virtual paths to work together? Agui GUI API -> https://github.com/jmasterx/Agui |
Thomas Fjellstrom
Member #476
June 2000
|
can't you mount the system fs on its own virtual mount in physfs? -- |
jmasterx
Member #11,410
October 2009
|
I'm not sure what the syntax should be. I tried: PHYSFS_addToSearchPath("/", 1) Edit: setting the interface is not working. ALLEGRO_PATH* path = al_get_standard_path(ALLEGRO_USER_DATA_PATH); std::string pathStr; pathStr += al_path_cstr(path,ALLEGRO_NATIVE_PATH_SEP); al_set_standard_file_interface(); bool made = al_make_directory(pathStr.c_str()); int eno = al_get_errno(); m_settingsPath = pathStr; al_destroy_path(path); make directory is failing and when I check with the debugger, the make directory receives a vtable for physfs. Agui GUI API -> https://github.com/jmasterx/Agui |
Elias
Member #358
May 2000
|
Try al_set_standard_fs_interface. Don't ask why they are separate things. -- |
jmasterx
Member #11,410
October 2009
|
Oh, thanks. I had not even realized that there were 2 functions. Agui GUI API -> https://github.com/jmasterx/Agui |
|