Map Editor Parent Directory Error

Bug #1608558 reported by Tino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

Steps to reproduce:
1.) Start Map Editor
2.) Open Save Dialog => You are in ~/.widelands/maps/My_Maps => Only Maps and (if existing) subdirs are shown
3.) Go into a Subdir or use create subdir to create a new subdir => <parent> and if existing maps are shown
4.) Double click <parent> to go back into My_Maps

=> Now there is still a <parent> entry shown and if clicked this leads to an unexpected_error message about string manipulation.

This bug is present in branch https://code.launchpad.net/~widelands-dev/widelands/bug-1588063

Related branches

Tino (tino79)
Changed in widelands:
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → High
assignee: nobody → Tino (tino79)
milestone: none → build19-rc1
status: Triaged → New
Revision history for this message
GunChleoc (gunchleoc) wrote :

I can't reproduce this.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I can reproduce this on Windows. It also get a crash if I have "<" in the directory name when I create it. I also tested input in Arabic script, which does not crash.

On Linux, I got a crash when I called it ".." - should be fixed already in the attached branch.

Changed in widelands:
status: New → Triaged
tags: added: ui windows
tags: added: filesystem
Revision history for this message
GunChleoc (gunchleoc) wrote :

List of illegal characters for Windows:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

Linux:

http://www.linfo.org/file_name.html

Mac:

https://support.apple.com/en-us/HT202808

We can't just regex for [\w\d]*, because this would disallow filenames in Arabic, Russian, Chinese etc.

Revision history for this message
GunChleoc (gunchleoc) wrote :

The problem is - who would have thought - the file separator:

Current dir is: maps\My_Maps
Base dir is: maps\My_Maps

NOCOM double-clicked! (entering subdir)
Current dir is: maps/My_Maps/gun ain
Base dir is: maps\My_Maps
Dirs not equal - add parent

NOCOM double-clicked! (back to original dir)
Current dir is: maps/My_Maps
Base dir is: maps\My_Maps
Dirs not equal - add parent

NOCOM double-clicked! (fake parent dir)
<crash>

So, after fixing this, we should also test nested subdirectories.

Tino (tino79)
Changed in widelands:
assignee: Tino (tino79) → GunChleoc (gunchleoc)
status: Triaged → In Progress
Tino (tino79)
Changed in widelands:
assignee: GunChleoc (gunchleoc) → nobody
status: In Progress → Fix Committed
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.