Skip to content
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

Configure FileInitDataParser to omit spaces around '=' when writing config files (#1498) #1536

Merged

Conversation

danielrschmidt
Copy link
Contributor

Changed the AssigmentSpacer of the FileIniDataParser instance to the empty string. This removes spaces around the '=' in the kde mimeapps and .desktop files and should enable KDE to parse the files without issues. Fixes #1498 on my system.

empty string. This removes spaces around the '=' in the kde mimeapps and
.desktop files and should enable KDE to parse the files without issues.
Should fix KSP-CKAN#1498
@pjf
Copy link
Member

pjf commented Dec 13, 2015

This looks good to me, although I had to double check that 'AssigmentSpacer' was the actual name of the field. Testing now and will merge if all looks good. :)

@pjf
Copy link
Member

pjf commented Dec 13, 2015

Working for me! Thank you! Merging now with great thanks!

@pjf pjf merged commit 7868b92 into KSP-CKAN:master Dec 13, 2015
pjf added a commit that referenced this pull request Dec 13, 2015
* danielrschmidt/1498_fix_CKAN_KDE_mimeapps_issues:
  Changed the AssignentSpacer of the FileIniDataParser instance to the empty string. This removes spaces around the '=' in the kde mimeapps and .desktop files and should enable KDE to parse the files without issues. Should fix #1498
@pjf pjf removed the pull request label Dec 13, 2015
@politas
Copy link
Member

politas commented Dec 13, 2015

Where does FileInitDataParser come from?

@pjf
Copy link
Member

pjf commented Dec 13, 2015

@politas : It's a third-party library we link against. I believe (but not checked) it's this one.

@politas
Copy link
Member

politas commented Dec 13, 2015

Hoo boy! I do not understand C#.

@pjf
Copy link
Member

pjf commented Dec 13, 2015

@politas:

The relevant lines are way up the top of the file:

using IniParser;
using IniParser.Exceptions;
using IniParser.Model;

When I first started working on the CKAN over a year ago I had no idea where anything came from. There was lots of comments saying 'Help! How do I do X in C#?'. :)

@politas
Copy link
Member

politas commented Dec 13, 2015

I've never fully absorbed the idea of inheritance. I can work with pretty much any procedural language, but this object stuff makes my head melt. If you need some help getting something complex done within a procedure, let me know and I'll knock out some torturous pseudocode to get it done, but every time I try to look at this code, I just don't know where to start to understand it.

@danielrschmidt
Copy link
Contributor Author

Glad to be of help, CKAN is really awesome! As for the AssigmentSeparator field... that threw me off at first, too, thought it was some weird C# issue before I realized that there was no 'n' in Assigment ;) Considered filing an issue with IniParser, but then again that would just raise a bunch of compatibility issues for CKAN.

@politas
Copy link
Member

politas commented Dec 13, 2015

Typos in API and public titles are a nuisance. At work, I regularly have to look at a text string that says "The 5 varibles are...", which annoys the heck out of me.

@politas
Copy link
Member

politas commented Dec 13, 2015

Have both mimeapps.list and CKAN Launcher.desktop file creation been tested with spaces in file paths, to make sure they are properly escaped? Do we have a list of unit tests for these portions somewhere?

@danielrschmidt danielrschmidt deleted the 1498_fix_CKAN_KDE_mimeapps_issues branch December 13, 2015 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants