[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-28-gb3620fb89
paul at claws-mail.org
paul at claws-mail.org
Tue Jan 26 12:53:53 CET 2021
The branch, gtk3 has been updated
via b3620fb89edb29ad4306bc02a927ba15799209a5 (commit)
from 07d5a51eb2235e15879252885417ef2bd864ab41 (commit)
Summary of changes:
src/folder.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit b3620fb89edb29ad4306bc02a927ba15799209a5
Author: Paul <paul at claws-mail.org>
Date: Tue Jan 26 11:53:09 2021 +0000
fix bug 4431, 'folder chmod doesn't affect .claws_mark and .claws_cache files'
diff --git a/src/folder.c b/src/folder.c
index 3982e858f..810a90375 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -2773,20 +2773,25 @@ void folder_item_write_cache(FolderItem *item)
mark_file = folder_item_get_mark_file(item);
if (item->cache_dirty || item->tags_dirty)
tags_file = folder_item_get_tags_file(item);
- if (msgcache_write(cache_file, mark_file, tags_file, item->cache) < 0) {
+ if (msgcache_write(cache_file, mark_file, tags_file, item->cache) == 0) {
prefs = item->prefs;
- if (prefs && prefs->enable_folder_chmod && prefs->folder_chmod) {
- /* for cache file */
+ if (prefs && prefs->enable_folder_chmod && prefs->folder_chmod) {
filemode = prefs->folder_chmod;
if (filemode & S_IRGRP) filemode |= S_IWGRP;
if (filemode & S_IROTH) filemode |= S_IWOTH;
- if (cache_file != NULL)
- chmod(cache_file, filemode);
+ if (cache_file) {
+ if (chmod(cache_file, filemode) < 0)
+ FILE_OP_ERROR(cache_file, "chmod");
+ }
+ if (mark_file) {
+ if (chmod(mark_file, filemode) < 0)
+ FILE_OP_ERROR(mark_file, "chmod");
+ }
}
} else {
- item->cache_dirty = FALSE;
- item->mark_dirty = FALSE;
- item->tags_dirty = FALSE;
+ item->cache_dirty = TRUE;
+ item->mark_dirty = TRUE;
+ item->tags_dirty = TRUE;
}
if (!need_scan && item->folder->klass->set_mtime) {
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list