Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-12 22:06:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-12 22:06:36 +0400
commit3e7ad0e2714009509004669d8da8ea8c71fa0d04 (patch)
tree9448ca11bb4325aedda01e9aa418b981ebc7d278 /source/blender/blenlib/BLI_fileops.h
parentcd0608aff5958e6fc59aad10730255d3cac48622 (diff)
fix [#29537] file/save crashes when target path isnt found
bug was that uiPupMenuSaveOver(...) could run the WM API call function which freed the operator, within the low level invoke function which kept using the freed memory. Changed uiPupMenuSaveOver(...) to only show a popup so the caller needs to check if the file exists and should be immediately written (which was done everywhere except for blend saving anyway). * added note that operators invoke/exec funcs cant call WM_operator_call(...) on themselves, ends up using freed memory. * added BLI_is_file(path), checks the file exists and isnt a directory.
Diffstat (limited to 'source/blender/blenlib/BLI_fileops.h')
-rw-r--r--source/blender/blenlib/BLI_fileops.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 712429716a6..2e8f1a5512e 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -56,6 +56,7 @@ int BLI_create_symlink(const char *path, const char *to);
struct direntry;
int BLI_is_dir(const char *path);
+int BLI_is_file(const char *path);
void BLI_dir_create_recursive(const char *dir);
double BLI_dir_free_space(const char *dir);
char *BLI_current_working_dir(char *dir, const int maxlen);