From 2b6b8cc8d663254c7e5a3a17d565f8e70f5f2825 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 25 May 2009 11:48:23 +0200 Subject: [PATCH] wineboot: Compain loudly if we can't find wine.inf. --- programs/wineboot/wineboot.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 0aec488b3e2..85e2897a0f8 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -668,18 +668,22 @@ static void update_wineprefix( int force ) const char *config_dir = wine_get_config_dir(); char *inf_path = get_wine_inf_path(); + int fd; struct stat st; if (!inf_path) { - WINE_WARN( "cannot find path to wine.inf file\n" ); + WINE_MESSAGE( "wine: failed to update %s, wine.inf not found\n", config_dir ); return; } - if (stat( inf_path, &st ) == -1) + if ((fd = open( inf_path, O_RDONLY )) == -1) { - WINE_WARN( "cannot stat wine.inf file: %s\n", strerror(errno) ); + WINE_MESSAGE( "wine: failed to update %s with %s: %s\n", + config_dir, inf_path, strerror(errno) ); goto done; } + fstat( fd, &st ); + close( fd ); if (update_timestamp( config_dir, st.st_mtime ) || force) {