From 3bf829b0bd9dbd2a7107d4e661ad4bcb7f0b392f Mon Sep 17 00:00:00 2001 From: driAn Date: Wed, 13 Aug 2008 21:44:24 +0000 Subject: [PATCH] output the full path when writing to files git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2313 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/tools.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/src/tools.cpp b/source/src/tools.cpp index 3d8912eb..b27c4fc1 100644 --- a/source/src/tools.cpp +++ b/source/src/tools.cpp @@ -140,6 +140,7 @@ const char *findfile(const char *filename, const char *mode) FILE *openfile(const char *filename, const char *mode) { const char *found = findfile(filename, mode); + if(mode && mode[0]=='w' || mode[0]=='a') conoutf("writing to file: %s", found); if(!found) return NULL; return fopen(found, mode); } @@ -147,6 +148,7 @@ FILE *openfile(const char *filename, const char *mode) gzFile opengzfile(const char *filename, const char *mode) { const char *found = findfile(filename, mode); + if(mode && mode[0]=='w' || mode[0]=='a') conoutf("writing to file: %s", found); if(!found) return NULL; return gzopen(found, mode); }