projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71b5ef7
)
Temp streams are removed always when same file is requested to be saved
author
Jose Dapena Paz
<jdapena@igalia.com>
Tue, 17 Mar 2009 20:45:57 +0000
(20:45 +0000)
committer
Jose Dapena Paz
<jdapena@igalia.com>
Tue, 17 Mar 2009 20:45:57 +0000
(20:45 +0000)
pmo-trunk-r8129
src/modest-utils.c
patch
|
blob
|
history
diff --git
a/src/modest-utils.c
b/src/modest-utils.c
index
eb21481
..
33b5a04
100644
(file)
--- a/
src/modest-utils.c
+++ b/
src/modest-utils.c
@@
-155,6
+155,12
@@
modest_utils_create_temp_stream (const gchar *orig_name, const gchar *hash_base,
}
filepath = g_strconcat (tmpdir, "/", orig_name, NULL);
+
+ /* if file exists, first we try to remove it */
+ if (modest_utils_file_exists (filepath)) {
+ g_unlink (filepath);
+ }
+
/* don't overwrite if it already exists, even if it is writable */
if (modest_utils_file_exists (filepath)) {
if (path!=NULL) {