[Commits] [SCM] claws branch, master, updated. 3.17.8-17-ge592ea6bd
paul at claws-mail.org
paul at claws-mail.org
Tue Jan 26 12:53:13 CET 2021
The branch, master has been updated
via e592ea6bd0b9f1e8e0aa56c2b7b3ad97a38a7919 (commit)
from 4b693837698c95bd6260302a8239745057a7f4b1 (commit)
Summary of changes:
src/folder.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit e592ea6bd0b9f1e8e0aa56c2b7b3ad97a38a7919
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