mapserver/mapserver — pull request #4747 by tbonfort (2013-09-01 09:01:54+00:00)
Title: Double backslashes in Windows UNC pathnames should be escaped by the mapfile writer

Since the mapserver parser changes the double backslashes to a single slash the reverse operation should take place when writing the mapfile. Currently if we do subsequent load and write operations on the same mapfile we may get invalid file locatons in the mapfiles.

For exampe if we have "\\\\myserver\\myshare\\Maps\\myfile.shp" in the DATA section loading and then saving the file will results: "\\myserver\myshare\Maps\myfile.shp". When loading the map back again we will get "\myserver\myshare\Maps\myfile.shp" which is an invalid file location causing run time issues.

I think backslashes should be replaced with double backslashes every time when saving the file at least in the CONNECTION, DATA, SHAPEPATH, FONTSET, SYMBOLSET sections.