comparison src/log.c @ 5436:ad445074d239

[gaim-migrate @ 5818] Another big commit. Ugh. I need a very smart regexp. Core/UI split do_error_dialog(), and soon the mail dialogs! Yay! This should work without problems at all, but standard disclaimer.. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 18 May 2003 19:59:02 +0000
parents 1f901484599d
children c72213437829
comparison
equal deleted inserted replaced
5435:a2f26666de42 5436:ad445074d239
13 13
14 #include "gaim.h" 14 #include "gaim.h"
15 #include "core.h" 15 #include "core.h"
16 #include "multi.h" 16 #include "multi.h"
17 #include "prpl.h" 17 #include "prpl.h"
18 #include "notify.h"
18 #include <string.h> 19 #include <string.h>
19 #include <sys/stat.h> 20 #include <sys/stat.h>
20 #include <unistd.h> 21 #include <unistd.h>
21 22
22 #ifdef _WIN32 23 #ifdef _WIN32
156 if (!fd) { 157 if (!fd) {
157 res = mkdir(log_all_file, S_IRUSR | S_IWUSR | S_IXUSR); 158 res = mkdir(log_all_file, S_IRUSR | S_IWUSR | S_IXUSR);
158 if (res < 0) { 159 if (res < 0) {
159 g_snprintf(buf, BUF_LONG, _("Unable to make directory %s for logging"), 160 g_snprintf(buf, BUF_LONG, _("Unable to make directory %s for logging"),
160 log_all_file); 161 log_all_file);
161 do_error_dialog(buf, NULL, GAIM_ERROR); 162 gaim_notify_error(NULL, NULL, buf, NULL);
162 g_free(buf); 163 g_free(buf);
163 g_free(buf2); 164 g_free(buf2);
164 return NULL; 165 return NULL;
165 } 166 }
166 } else 167 } else
177 if (!fd) { 178 if (!fd) {
178 res = mkdir(log_all_file, S_IRUSR | S_IWUSR | S_IXUSR); 179 res = mkdir(log_all_file, S_IRUSR | S_IWUSR | S_IXUSR);
179 if (res < 0) { 180 if (res < 0) {
180 g_snprintf(buf, BUF_LONG, _("Unable to make directory %s for logging"), 181 g_snprintf(buf, BUF_LONG, _("Unable to make directory %s for logging"),
181 log_all_file); 182 log_all_file);
182 do_error_dialog(buf, NULL, GAIM_ERROR); 183 gaim_notify_error(NULL, NULL, buf, NULL);
183 g_free(buf); 184 g_free(buf);
184 g_free(buf2); 185 g_free(buf2);
185 return NULL; 186 return NULL;
186 } 187 }
187 } else 188 } else
189 #else /* _WIN32 */ 190 #else /* _WIN32 */
190 g_snprintf(log_all_file, 256, "%s" G_DIR_SEPARATOR_S "logs", gaim_dir); 191 g_snprintf(log_all_file, 256, "%s" G_DIR_SEPARATOR_S "logs", gaim_dir);
191 192
192 if( _mkdir(log_all_file) < 0 && errno != EEXIST ) { 193 if( _mkdir(log_all_file) < 0 && errno != EEXIST ) {
193 g_snprintf(buf, BUF_LONG, _("Unable to make directory %s for logging"), log_all_file); 194 g_snprintf(buf, BUF_LONG, _("Unable to make directory %s for logging"), log_all_file);
194 do_error_dialog(buf, NULL, GAIM_ERROR); 195 gaim_notify_error(NULL, NULL, buf, NULL);
195 g_free(buf); 196 g_free(buf);
196 g_free(buf2); 197 g_free(buf2);
197 return NULL; 198 return NULL;
198 } 199 }
199 #endif 200 #endif