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:
-rw-r--r--source/blender/blenlib/intern/path_util.c2
-rw-r--r--source/blender/editors/space_file/filesel.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 9a56722b5d9..260f59aa03c 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -637,6 +637,8 @@ int BLI_path_abs(char *path, const char *basepath)
if (path[0]!='\0') {
if ( path[strlen(path)-1]=='/') {
+ /* remove the '/' so we avoid BLI_cleanup_dir adding an extra \ in WIN32 */
+ path[strlen(path)-1] = '\0';
BLI_cleanup_dir(NULL, path);
} else {
BLI_cleanup_file(NULL, path);
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 659763921c7..8783296f5c2 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -206,6 +206,13 @@ short ED_fileselect_set_params(SpaceFile *sfile)
params->filter = 0;
params->sort = FILE_SORT_ALPHA;
}
+
+
+ /* initialize the list with previous folders */
+ if (!sfile->folders_prev)
+ sfile->folders_prev = folderlist_new();
+ folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
+
return 1;
}