openframeworks/openFrameworks — pull request #1872 by ofTheo (2013-02-11 16:40:39+00:00)
Title: fix for ofToDataPath - checks now for both backslash and forwardslash be...

...fore prepending the data path. Closes #1867

as we are listing the default data path as "data/" for windows .
this grabs the substr of the file path of the same length as the ofDataPathRoot and then converts any \ to / for the check.

it doesn't modify the incoming path - just allows it to pass the check so that data\myFile.txt doesn't become data/data\myFile.txt

would be good to test all windows examples to make sure this fix doesn't introduce any other bugs.