New data structure result in wrong string for datafolder

Bug #1540310 reported by kaputtnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Low
Unassigned

Bug Description

The last changes to the data dir result in a faulty string on linux when starting widelands in console:

./widelands
Set home directory: /home/kaputtnik/.widelands
Widelands executable directory: /home/kaputtnik/Quellcode/widelands-repo/trunk/
Adding directory: /home/kaputtnik/Quellcode/widelands-repo/trunk//./data

Nevertheless the game starts and it seems no malfunction is triggered with this string. Starting with option "--datadir=" the string of the path is correct:

./widelands --datadir=/home/kaputtnik/widelands/data/
Set home directory: /home/kaputtnik/.widelands
Adding directory: /home/kaputtnik/widelands/data/

Seen in r7746.

Related branches

Revision history for this message
GunChleoc (gunchleoc) wrote :

We had to make it look that weird so it will work on Windows. So, any fix to make this look clean again will need to be done carefully.

tags: added: cleanups
Changed in widelands:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Tino (tino79) wrote :

This is result by my change in wl_application.cc line 901.
get_executable_dir() seems to give back a path with a trailing slash on linux but without one on windows.

See also https://bugs.launchpad.net/widelands/+bug/1538936

Revision history for this message
SirVer (sirver) wrote :

The directory /home/kaputtnik/Quellcode/widelands-repo/trunk//./data is not faulty, it is just not canonicalized. Imho Posix allows multiple consecutive, which will just get merged into one.

We could call FileSystem::canonicalize_name on the datadir path to make this look nicer, but this is definitively non critical.

GunChleoc (gunchleoc)
tags: added: lowhangingfruit
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in r7785.

Changed in widelands:
status: Confirmed → Fix Committed
milestone: none → build19-rc1
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.