diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-10-06 21:37:03 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-10-06 21:37:03 +0400 |
commit | d16a8649ff6c2b65492a78eab80bcdbefa9dbe9d (patch) | |
tree | 5d2a2bd518cc7de908ad516a28ee8011d9a7e590 /source/blender/blenlib | |
parent | 1513e96857538a5a686439247c0608bd1dfce64a (diff) | |
parent | de6a9d0194abacb1bd2de5283e72440b4916325c (diff) |
merge runk 16887:16950
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 442a629b12d..013b9e0bb1b 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -893,7 +893,10 @@ void BLI_cleanup_file(const char *relabase, char *dir) */ #ifdef WIN32 - if(dir[0]=='.') { /* happens for example in FILE_MAIN */ + + /* Note, this should really be moved to the file selector, + * since this function is used in many areas */ + if(strcmp(dir, ".")==0) { /* happens for example in FILE_MAIN */ get_default_root(dir); return; } @@ -1182,7 +1185,7 @@ int BLI_convertstringcode(char *path, const char *basepath) * Add a / prefix and lowercase the driveletter, remove the : * C:\foo.JPG -> /c/foo.JPG */ - if (tmp[1] == ':' && isalpha(tmp[0]) && (tmp[2]=='\\' || tmp[2]=='/') ) { + if (isalpha(tmp[0]) && tmp[1] == ':' && (tmp[2]=='\\' || tmp[2]=='/') ) { tmp[1] = tolower(tmp[0]); /* replace ':' with driveletter */ tmp[0] = '/'; /* '\' the slash will be converted later */ |