Skip to content

Commit

Permalink
utils/ofUtils.cpp: fix for ofToDataPath with empty path. Closes openf…
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoc committed Apr 26, 2010
1 parent cdfe178 commit b50173a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/openFrameworks/utils/ofUtils.cpp
Expand Up @@ -146,11 +146,11 @@ string ofToDataPath(string path, bool makeAbsolute){

//check if absolute path has been passed or if data path has already been applied
//do we want to check for C: D: etc ?? like substr(1, 2) == ':' ??
if( path.substr(0,1) != "/" && path.substr(1,1) != ":" && path.substr(0,dataPathRoot.length()) != dataPathRoot){
if( path.length()==0 || (path.substr(0,1) != "/" && path.substr(1,1) != ":" && path.substr(0,dataPathRoot.length()) != dataPathRoot)){
path = dataPathRoot+path;
}

if(makeAbsolute && path.substr(0,1) != "/"){
if(makeAbsolute && (path.length()==0 || path.substr(0,1) != "/")){
#ifndef TARGET_OF_IPHONE

#ifndef _MSC_VER
Expand Down

0 comments on commit b50173a

Please sign in to comment.