From b92d66911f2d9f8345af393395c5c6e942799a60 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 15 Feb 2012 18:34:25 +0000 Subject: [PATCH] Should fix #448: make sure we go to the main file directory when wqloading one at startup. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1904 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.c b/src/main.c index 08685850..2b765e0e 100644 --- a/src/main.c +++ b/src/main.c @@ -801,6 +801,12 @@ int Init_program(int argc,char * argv[]) Capture_brush(0,0,0,0,0); *Brush=MC_White; *Brush_original_pixels=MC_White; + + // Make sure the load dialog pointsto the right place when first shown. + // Done after loading everything else, but before checking for emergency + // backups + if (file_in_command_line > 0) + chdir(main_directory); // Test de recuperation de fichiers sauvés switch (Check_recovery())