diff -Nru a/edit/editwidget.c b/edit/editwidget.c
a
|
b
|
|
170 | 170 | int |
171 | 171 | edit_file (const char *_file, int line) |
172 | 172 | { |
173 | | static int made_directory = 0; |
174 | 173 | Dlg_head *edit_dlg; |
175 | 174 | WButtonBar *edit_bar; |
176 | 175 | |
177 | | if (!made_directory) { |
| 176 | { |
178 | 177 | char *dir = mhl_str_dir_plus_file (home_dir, EDIT_DIR); |
179 | | made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST); |
| 178 | if (g_mkdir_with_parents (dir, 0700)) { |
| 179 | return 0; |
| 180 | } |
180 | 181 | g_free (dir); |
181 | 182 | } |
182 | 183 | |
diff -Nru a/src/profile.c b/src/profile.c
a
|
b
|
|
29 | 29 | |
30 | 30 | #include <sys/types.h> |
31 | 31 | |
| 32 | #include "fileloc.h" |
32 | 33 | #include "global.h" |
33 | 34 | #include "profile.h" |
34 | 35 | |
… |
… |
|
403 | 404 | if (!p) |
404 | 405 | return; |
405 | 406 | dump_profile (p->link); |
| 407 | { |
| 408 | char *dir = concat_dir_and_file (home_dir, MC_USERCONF_DIR); |
| 409 | if (g_mkdir_with_parents (dir, 0700)) { |
| 410 | return; |
| 411 | } |
| 412 | g_free (dir); |
| 413 | } |
406 | 414 | /* .ado: p->FileName can be empty, it's better to jump over */ |
407 | 415 | if (p->FileName[0] != (char) 0) |
408 | 416 | if ((profile = fopen (p->FileName, "w")) != NULL){ |
diff -Nru a/src/setup.h b/src/setup.h
a
|
b
|
|
1 | 1 | #ifndef MC_SETUP_H |
2 | 2 | #define MC_SETUP_H |
3 | 3 | |
| 4 | #include "fileloc.h" |
4 | 5 | #include "panel.h" |
5 | 6 | |
6 | 7 | char *setup_init (void); |
… |
… |
|
26 | 27 | extern int startup_right_mode; |
27 | 28 | extern int verbose; |
28 | 29 | |
29 | | #define PROFILE_NAME ".mc/ini" |
30 | | #define HOTLIST_FILENAME ".mc/hotlist" |
| 30 | #define PROFILE_NAME MC_USERCONF_DIR PATH_SEP_STR MC_CONFIG_FILE |
| 31 | #define HOTLIST_FILENAME MC_USERCONF_DIR PATH_SEP_STR MC_HOTLIST_FILE |
31 | 32 | |
32 | 33 | #endif |