gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > libfat and chdir("/")

#118294 - SukkoPera - Sun Feb 11, 2007 10:54 pm

When I do chdir("/") in a libfat-enabled program, it returns 0, but the directory is not changed, actually. getcwd() returns the old one, still, and diropen(".") will return the contents of the old directory.
_________________
Nintendo DS Lite (White) + Supercard Lite + R4 + Sandisk 1 GB MicroSD
Sony PSP + Firmware 3.03 OE-A2

#118320 - chishm - Mon Feb 12, 2007 3:30 am

I tracked down the bug. Unfortunately the code is part of DKA, not libfat, so you might need to wait for a fix. To work around it, use chdir("/.") instead of chdir("/") .
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com

#118349 - SukkoPera - Mon Feb 12, 2007 1:37 pm

OK, thanks for looking!
_________________
Nintendo DS Lite (White) + Supercard Lite + R4 + Sandisk 1 GB MicroSD
Sony PSP + Firmware 3.03 OE-A2