diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-18 05:37:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-18 05:49:10 +0300 |
commit | 28c34d332f941259de6775af57758609ee7c92e9 (patch) | |
tree | d942a49bf7b619639af493e5d3dab53df0aec47f /source/blender/blenlib/intern/storage.c | |
parent | 03efc37a6ebc4a6b288fc6cc42a172f4a1e85192 (diff) |
Assert when relative paths are passed to IO ops
This is typically an error (& hangs a few seconds on win32), best catch early.
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 7b7733dea37..7fdf6ec8101 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -227,6 +227,7 @@ int BLI_exists(const char *name) #else struct stat st; BLI_assert(name); + BLI_assert(!BLI_path_is_rel(name)); if (stat(name, &st)) return(0); #endif return(st.st_mode); |