Fix most of issue 462 : Inconsistent directories in file selectors for image and brush.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1926 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2012-03-09 01:18:23 +00:00
parent 9ca899355c
commit 747f9e8526
2 changed files with 14 additions and 30 deletions

View File

@@ -1400,36 +1400,21 @@ byte Button_Load_or_Save(byte load, T_IO_Context *context)
Window_display_icon_sprite(bookmark_dropdown[temp]->Pos_X+3,bookmark_dropdown[temp]->Pos_Y+2,ICON_STAR);
Display_bookmark(bookmark_dropdown[temp],temp);
}
// On prend bien soin de passer dans le répertoire courant (le bon qui faut! Oui madame!)
if (load)
{
#if defined(__MINT__)
static char path[1024]={0};
chdir(Main_current_directory);
Dgetpath(path,0);
strcat(path,PATH_SEPARATOR);
strcpy(Main_current_directory,path);
#else
chdir(Main_current_directory);
getcwd(Main_current_directory,256);
#endif
}
else
#if defined(__MINT__)
{
#if defined(__MINT__)
static char path[1024]={0};
chdir(context->File_directory);
Dgetpath(path,0);
strcat(path,PATH_SEPARATOR);
strcpy(Main_current_directory,path);
#else
}
#else
{
chdir(context->File_directory);
getcwd(Main_current_directory,256);
#endif
}
#endif
// Affichage des premiers fichiers visibles:
Reload_list_of_files(Main_format,file_scroller);