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>2009-10-15 15:11:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-10-15 15:11:52 +0400
commit734d50e8df0c06e6a4630078f4b7250fbe7d6dcc (patch)
treed93d0c54903f28d4709ad45533548715cc0fddc3 /source/blender/editors/space_file/filesel.c
parent384a1b5a5c15cfc5311f3865bde095d89130cfa5 (diff)
typing in non-existant dirs now goes back to the previous dir. (also for bookmarks and when changing dir's in other places)
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 9f5d889c7b9..89678bffd01 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -384,9 +384,15 @@ FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar
return sfile->layout;
}
-void file_change_dir(struct SpaceFile *sfile)
+void file_change_dir(struct SpaceFile *sfile, int checkdir)
{
- if (sfile->params) {
+ if (sfile->params) {
+
+ if(checkdir && S_ISDIR(BLI_exists(sfile->params->dir)) == 0) {
+ BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), sizeof(sfile->params->dir));
+ /* could return but just refresh the current dir */
+ }
+
filelist_setdir(sfile->files, sfile->params->dir);
if(folderlist_clear_next(sfile))