Alexandre Julliard : wineboot: Compain loudly if we can't find wine.inf.

Alexandre Julliard julliard at winehq.org
Mon May 25 10:06:34 CDT 2009


Module: wine
Branch: master
Commit: 2b6b8cc8d663254c7e5a3a17d565f8e70f5f2825
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2b6b8cc8d663254c7e5a3a17d565f8e70f5f2825

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon May 25 11:48:23 2009 +0200

wineboot: Compain loudly if we can't find wine.inf.

---

 programs/wineboot/wineboot.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 0aec488..85e2897 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)
     {




More information about the wine-cvs mailing list