diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-18 12:58:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-18 13:03:15 +0400 |
commit | a089a86edd720e8b2e00abfd18d4155cd70eb433 (patch) | |
tree | 396ee5348a581749abb788312dc6eb30bac19f03 /source/blender | |
parent | 9127b8f2a30033a31ca07923df6cf9eae9c5002b (diff) |
Fix BLI_cleanup_path: '.' at the start of a path
On windows "." was replaced with the root directory.
On other systems any path starting with a '.' would be replaced with "/"
This was added for the file selector only,
so better handle this in the file selector (though it looks not to be needed).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index de1ca7ef742..0ad2ba049b4 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -365,14 +365,6 @@ void BLI_cleanup_path(const char *relabase, char *path) */ #ifdef WIN32 - - /* Note, this should really be moved to the file selector, - * since this function is used in many areas */ - if (strcmp(path, ".") == 0) { /* happens for example in FILE_MAIN */ - get_default_root(path); - return; - } - while ( (start = strstr(path, "\\..\\")) ) { eind = start + strlen("\\..\\") - 1; a = start - path - 1; @@ -400,12 +392,6 @@ void BLI_cleanup_path(const char *relabase, char *path) memmove(start, eind, strlen(eind) + 1); } #else - if (path[0] == '.') { /* happens, for example in FILE_MAIN */ - path[0] = '/'; - path[1] = 0; - return; - } - while ( (start = strstr(path, "/../")) ) { a = start - path - 1; if (a > 0) { |