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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-02-15 18:26:41 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-15 18:35:42 +0300
commit1c64543aefd5c78540dc3de5254c0dd54649ca81 (patch)
tree4619f9f49f62a08d565e24baf87ef6e5150ffc5b /source/blender/editors/space_file/file_ops.c
parentf1ee11fcca20ce1fb7db97a71e7e345c6faad69a (diff)
Cleanup of SpaceFile, from asset-experiments branch mostly.
Helps keeping diff with branch relevant and clean...
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index ddf9545289e..6cc4446274a 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -179,16 +179,18 @@ static FileSelect file_select_do(bContext *C, int selected_idx, bool do_diropen)
params->active_file = selected_idx;
if (S_ISDIR(file->type)) {
+ const bool is_parent_dir = FILENAME_IS_PARENT(file->relname);
+
if (do_diropen == false) {
params->file[0] = '\0';
retval = FILE_SELECT_DIR;
}
/* the path is too long and we are not going up! */
- else if (!FILENAME_IS_PARENT(file->relname) && strlen(params->dir) + strlen(file->relname) >= FILE_MAX) {
+ else if (!is_parent_dir && strlen(params->dir) + strlen(file->relname) >= FILE_MAX) {
// XXX error("Path too long, cannot enter this directory");
}
else {
- if (FILENAME_IS_PARENT(file->relname)) {
+ if (is_parent_dir) {
/* avoids /../../ */
BLI_parent_dir(params->dir);
}