OpenPandora patch for FAT FS

Bug #1153361 reported by Canseco on 2013-03-10
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Low
Unassigned

Bug Description

Hi,

I compiled Widelands for OpenPandora, but needed to change filename of replay because FAT filesystems doesn't like character ":".

Canseco (machaquiro) wrote :
SirVer (sirver) wrote :

Well, ISO 8601 defines the ':', so I am not too fond of changing the char in all cases. Can you add a #ifdef that only applies for Pandora?

Changed in widelands:
status: New → Incomplete
importance: Undecided → Low
Jens Beyer (qcumber-some) wrote :

It seems to apply to FAT FS in general, not only on Pandora platforms. So it will occur on Linux and Windows, too... (but I wonder why it hasn't bothered someone in the past... )

I think a compile-time option is not the best solution to this... otoh, removing ':' seems wrong too.
And a user-overridable run-time solution with fallback only adds complexity.

SirVer (sirver) wrote :

Linux has never used fat for anything and windows is exfat since xp (i think). I doubt those filesystems have this limitation at all - I have a hard time that vfat had this limitation.

Nasenbaer (nasenbaer) wrote :

All Microsoft Windows filesystems I know (Fat16, Fat32, NTFS) disallow the ":" sign - simply because it is reserved for partitions (like c:\) - because of that, there are already special cases for Windows builds, that replace the ":" - the OpenPandora problem is new in that way, that a none Windows OS is installed and running on a windows filesystem (which is uncommon in the "normal" unix world, but quite common for mobile devices).

So this bug is quite valid - maybe there is a way to check whether the filesystem allows ":" ??

Canseco (machaquiro) wrote :

Exfat is not supported on OpenPandora, so Windows users use fat32 or ntfs for SD cards.

This characters are not allowed on fat32 filenames:

'\', '/', '?', '*', ':', ';' and '+'

This is the error that crash the game:

Unexpected error during the game
[/media/pandora/pandora/compilar/widelands-build17-src/src/logic/replay.cc:241] Failed to save game for replay: ZipFilesystem::MakeDirectory: problem with file/directory: /binary/

Changing ':' for '.' fixed this. For more info:

http://boards.openpandora.org/index.php/topic/11799-ported-game-widelands/?hl=widelands

SirVer (sirver) wrote :

Okay, convinced. Please do not make the patch conditional though, just replace it in all versions of Widelands for consistency.

Changed in widelands:
status: Incomplete → Confirmed
status: Confirmed → Triaged
Canseco (machaquiro) wrote :

No more #ifdef

SirVer (sirver) wrote :

Committed in r6548. Thanks for your work!

Changed in widelands:
status: Triaged → Fix Committed
Shevonar (shevonar) on 2013-08-10
Changed in widelands:
milestone: none → build18-rc1
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments