Created Issue: mono POSIX compatibility (simple patch) [5664]

0 views
Skip to first unread message

sparkviewengine Issue Tracker Rss Feed

unread,
Mar 14, 2010, 6:42:02 AM3/14/10
to spar...@googlegroups.com
The ASP.NET MVC project already works on Mono running under Linux, allowing us to use the framework on significantly more web hosting environments. This is great, but I'd really like to use Spark as the view engine. Luckily, spark is runs fine under mono too, with the following exception:

Spark hard-codes "\\" as the path separator, while on POSIX systems the file path separator is "/". The .NET framework already abstracts this character as System.IO.Path.DirectorySeparatorChar. So, all you need to do in order to make Spark run under Linux is replace specific instances of "\\" with System.IO.Path.DirectorySeparatorChar. This isn't just better for cross-platform compatibility, it's also good code hygiene to replace hard-coded "magic" characters with their proper symbolic representation.

To save you the effort, I've included the patch. This (tested) patch makes Spark and the MVC connector work properly under Linux (without affecting performance under Windows).

URL: http://sparkviewengine.codeplex.com/WorkItem/View.aspx?WorkItemId=5664

Tom Janssens

unread,
Mar 16, 2010, 4:06:26 AM3/16/10
to Spark View Engine Dev
Nice work !!! Thanks !!

On 14 mrt, 11:42, sparkviewengine Issue Tracker Rss Feed

Reply all
Reply to author
Forward
0 new messages