diff options
Diffstat (limited to 'source/blender/src/filesel.c')
-rw-r--r-- | source/blender/src/filesel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index 3d5e39fe942..ac1c0fb7dfe 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1578,8 +1578,7 @@ static void do_filesel_buttons(short event, SpaceFile *sfile) BLI_strncpy(sfile->dir, butname, sizeof(sfile->dir)); /* strip the trailing slash if its a real dir */ - if (strlen(butname)!=1) - butname[strlen(butname)-1]=0; + BLI_del_slash(butname); if(sfile->type & FILE_UNIX) { if (!BLI_exists(butname)) { @@ -1623,6 +1622,11 @@ static void do_filesel_buttons(short event, SpaceFile *sfile) BLI_strncpy(sfile->dir, lib->filename, sizeof(sfile->dir)); BLI_make_exist(sfile->dir); BLI_cleanup_dir(G.sce, sfile->dir); + + /* forced re-reading the blend file */ + if(sfile->libfiledata) BLO_blendhandle_close(sfile->libfiledata); + sfile->libfiledata= 0; + freefilelist(sfile); sfile->ofs= 0; scrarea_queue_winredraw(curarea); |