projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ae706ee
)
better handling of missing directories
author
Hoà Viêt Dinh
<dinh.viet.hoa@free.fr>
Fri, 18 May 2001 03:52:24 +0000
(
03:52
+0000)
committer
Hoà Viêt Dinh
<dinh.viet.hoa@free.fr>
Fri, 18 May 2001 03:52:24 +0000
(
03:52
+0000)
src/compose.c
patch
|
blob
|
history
diff --git
a/src/compose.c
b/src/compose.c
index c2c91ecd3b91913d6a98a35e71f75f2c7d54ac6f..fe5ed023b09684772559b09b55782b8cd918c3cf 100644
(file)
--- a/
src/compose.c
+++ b/
src/compose.c
@@
-1674,16
+1674,17
@@
static gint compose_save_to_outbox(Compose *compose, const gchar *file)
debug_print(_("saving sent message...\n"));
outbox = folder_get_default_outbox();
debug_print(_("saving sent message...\n"));
outbox = folder_get_default_outbox();
+ path = folder_item_get_path(outbox);
+ if (!is_dir_exist(path))
+ make_dir_hier(path);
+
folder_item_scan(outbox);
if ((num = folder_item_add_msg(outbox, file, FALSE)) < 0) {
folder_item_scan(outbox);
if ((num = folder_item_add_msg(outbox, file, FALSE)) < 0) {
+ g_free(path);
g_warning(_("can't save message\n"));
return -1;
}
g_warning(_("can't save message\n"));
return -1;
}
- path = folder_item_get_path(outbox);
- if (!is_dir_exist(path))
- make_dir_hier(path);
-
if ((fp = procmsg_open_mark_file(path, TRUE)) == NULL)
g_warning(_("can't open mark file\n"));
else {
if ((fp = procmsg_open_mark_file(path, TRUE)) == NULL)
g_warning(_("can't open mark file\n"));
else {
@@
-1782,18
+1783,18
@@
static gint compose_queue(Compose *compose, const gchar *file)
queue = folder_get_default_queue();
folder_item_scan(queue);
queue = folder_get_default_queue();
folder_item_scan(queue);
+ queue_path = folder_item_get_path(queue);
+ if (!is_dir_exist(queue_path))
+ make_dir_hier(queue_path);
if ((num = folder_item_add_msg(queue, tmp, TRUE)) < 0) {
g_warning(_("can't queue the message\n"));
unlink(tmp);
g_free(tmp);
if ((num = folder_item_add_msg(queue, tmp, TRUE)) < 0) {
g_warning(_("can't queue the message\n"));
unlink(tmp);
g_free(tmp);
+ g_free(queue_path);
return -1;
}
g_free(tmp);
return -1;
}
g_free(tmp);
- queue_path = folder_item_get_path(queue);
- if (!is_dir_exist(queue_path))
- make_dir_hier(queue_path);
-
if ((fp = procmsg_open_mark_file(queue_path, TRUE)) == NULL)
g_warning(_("can't open mark file\n"));
else {
if ((fp = procmsg_open_mark_file(queue_path, TRUE)) == NULL)
g_warning(_("can't open mark file\n"));
else {