New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double backslashes in Windows UNC pathnames should be escaped by the mapfile writer #4747

Merged
merged 1 commit into from Sep 1, 2013

Conversation

Projects
None yet
2 participants
@tbonfort
Member

tbonfort commented Sep 1, 2013

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.

szekerest added a commit that referenced this pull request Sep 1, 2013

Merge pull request #4747 from tbonfort/b4747-backslash-escaping
Double backslashes in Windows UNC pathnames should be escaped by the mapfile writer

@szekerest szekerest merged commit 6f5ee04 into mapserver:master Sep 1, 2013

1 check passed

default The Travis CI build passed
Details

@ghost ghost assigned tbonfort Sep 1, 2013

@tbonfort tbonfort deleted the tbonfort:b4747-backslash-escaping branch Sep 1, 2013

@szekerest

This comment has been minimized.

Show comment
Hide comment
@szekerest

szekerest Jan 26, 2014

Member

Looks like we require similar handling for the CONFIG section (writeHashTableInline). Some config options mas also contain filenames with backslashes which should also be escaped.

Member

szekerest commented Jan 26, 2014

Looks like we require similar handling for the CONFIG section (writeHashTableInline). Some config options mas also contain filenames with backslashes which should also be escaped.

szekerest added a commit to szekerest/mapserver that referenced this pull request Jan 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment