diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-06-30 03:21:11 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-06-30 03:21:11 +0400 |
commit | da32a0594b80aa5f980e17f446eb2d20c76272c5 (patch) | |
tree | 5761ecd7e7e1c652676124c30a9b2e82121cb167 /source/blender/editors/space_file/file_ops.c | |
parent | 17d5bfd9709583cb58c030ecea3f7d3fb44a81ad (diff) |
2.5 file browser
* remove '.' and '..' from file browser list. sigh!
* removed delete buttons from automatically added bookmarks (Desktop and Documents)
Note: please check on non-Windows platforms
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index dd20c8e8224..3e24f360e40 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -137,22 +137,15 @@ static void file_select(SpaceFile* sfile, ARegion* ar, const rcti* rect, short v params->active_file = last_file; if(file && S_ISDIR(file->type)) { - /* the path is too long and we are not going up! */ - if (strcmp(file->relname, ".") && - strcmp(file->relname, "..") && - strlen(params->dir) + strlen(file->relname) >= FILE_MAX ) + /* the path is too long! */ + if (strlen(params->dir) + strlen(file->relname) >= FILE_MAX ) { // XXX error("Path too long, cannot enter this directory"); } else { - if (strcmp(file->relname, "..")==0) { - /* avoids /../../ */ - BLI_parent_dir(params->dir); - } else { - strcat(params->dir, file->relname); - strcat(params->dir,"/"); - params->file[0] = '\0'; - BLI_cleanup_dir(G.sce, params->dir); - } + strcat(params->dir, file->relname); + strcat(params->dir,"/"); + params->file[0] = '\0'; + BLI_cleanup_dir(G.sce, params->dir); filelist_setdir(sfile->files, params->dir); filelist_free(sfile->files); params->active_file = -1; |