tvheadend/tvheadend — pull request #364 by ProfYaffle (2014-03-30 10:44:07+00:00)
Title: Addition of user options for file and directory permissions

Okay, that's the last time I accept a challenge :-)

Some significant re-writes to the config js code to make it more readable in both code and on screen, then the changes you'd expect to ripple the options all the way through. I've tested it and it appears to be fine, but **check it** please - I only learned C and Javascript last week, after all!

I went off down the road of using chars initially but reverted to int in the end (*a week in and I hate character pointers already - call that string handling??*). That does mean a creative approach to converting what the user types to the ultimate octal permissions assigned (i.e. 777 != 0777 without some judicious battering). While I'm confident on the overall code, I may have missed out 'good practice', e.g. destroying a variable after use, so check that, please.

Otherwise... see what you think.