Notabilis has proposed merging 
lp:~widelands-dev/widelands/bug-1794339-net-win-conditions into lp:widelands.

Commit message:
Adapt received path to file with win condition for the local filesystem.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1794339 in widelands: "segfault joining game"
  https://bugs.launchpad.net/widelands/+bug/1794339

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1794339-net-win-conditions/+merge/356683

Fixes a bug where Linux players are unable to join games hosted by Windows 
players.

The paths to the files for win conditions are sent with the local path 
separators ('/' on Linux vs. '\' on Windows). While Windows is able to use both 
separators and as such doesn't have a problem receiving the Linux-style path, 
Linux is unable to use the Windows-style path and fails to load the win 
condition.

This branch fixes the issue by transforming the received path to its local 
representation, as is already done for the path of the map file.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1794339-net-win-conditions into lp:widelands.
=== modified file 'src/network/gameclient.cc'
--- src/network/gameclient.cc	2018-10-09 17:02:29 +0000
+++ src/network/gameclient.cc	2018-10-14 11:07:15 +0000
@@ -793,7 +793,7 @@
 		break;
 	}
 	case NETCMD_WIN_CONDITION: {
-		d->settings.win_condition_script = packet.string();
+		d->settings.win_condition_script = g_fs->FileSystem::fix_cross_file(packet.string());
 		break;
 	}
 

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to