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:
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 3a579820106..ba6f91e8301 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -183,11 +183,11 @@ static FileSelect file_select_do(bContext *C, int selected_idx, bool do_diropen)
retval = FILE_SELECT_DIR;
}
/* the path is too long and we are not going up! */
- else if (strcmp(file->relname, "..") && strlen(params->dir) + strlen(file->relname) >= FILE_MAX) {
+ else if (!FILENAME_IS_PARENT(file->relname) && strlen(params->dir) + strlen(file->relname) >= FILE_MAX) {
// XXX error("Path too long, cannot enter this directory");
}
else {
- if (strcmp(file->relname, "..") == 0) {
+ if (FILENAME_IS_PARENT(file->relname)) {
/* avoids /../../ */
BLI_parent_dir(params->dir);
}
@@ -269,7 +269,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent *
for (idx = sel.last; idx >= 0; idx--) {
struct direntry *file = filelist_file(sfile->files, idx);
- if (STREQ(file->relname, "..") || STREQ(file->relname, ".")) {
+ if (FILENAME_IS_CURRPAR(file->relname)) {
file->selflag &= ~FILE_SEL_HIGHLIGHTED;
}
@@ -362,7 +362,7 @@ static int file_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if (idx >= 0) {
struct direntry *file = filelist_file(sfile->files, idx);
- if (STREQ(file->relname, "..") || STREQ(file->relname, ".")) {
+ if (FILENAME_IS_CURRPAR(file->relname)) {
/* skip - If a readonly file (".." or ".") is selected, skip deselect all! */
}
else {
@@ -1531,7 +1531,7 @@ static int file_rename_poll(bContext *C)
if (idx >= 0) {
struct direntry *file = filelist_file(sfile->files, idx);
- if (STREQ(file->relname, "..") || STREQ(file->relname, ".")) {
+ if (FILENAME_IS_CURRPAR(file->relname)) {
poll = 0;
}
}