[Commits] [SCM] claws branch, master, updated. 3.13.2-128-g61383c6
ticho at claws-mail.org
ticho at claws-mail.org
Fri Apr 22 13:32:36 CEST 2016
The branch, master has been updated
via 61383c66ea45ad4e17efce4c59441b35bae5ff25 (commit)
from f324ae742a2373282a7f61cb89348bc081233f9d (commit)
Summary of changes:
src/folder.c | 4 ++++
src/plugins/rssyl/rssyl_subscribe.c | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 61383c66ea45ad4e17efce4c59441b35bae5ff25
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Fri Apr 22 13:31:41 2016 +0200
Disallow folder names ending with a space on Windows.
Closes bug #2781.
diff --git a/src/folder.c b/src/folder.c
index bf286b3..2b4dbe0 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -4820,6 +4820,10 @@ gboolean folder_local_name_ok(const gchar *name)
alertpanel_error(_("A folder name cannot begin or end with a dot."));
return FALSE;
}
+ if (name[strlen(name) - 1] == ' ') {
+ alertpanel_error(_("A folder name can not end with a space."));
+ return FALSE;
+ }
#endif
return TRUE;
diff --git a/src/plugins/rssyl/rssyl_subscribe.c b/src/plugins/rssyl/rssyl_subscribe.c
index f80ec82..d68f4ce 100644
--- a/src/plugins/rssyl/rssyl_subscribe.c
+++ b/src/plugins/rssyl/rssyl_subscribe.c
@@ -129,11 +129,14 @@ gboolean rssyl_subscribe(FolderItem *parent, const gchar *url,
tmpname2 = g_strdup(tmpname);
#ifdef G_OS_WIN32
- /* Windows does not allow its filenames to start or end with a dot. */
+ /* Windows does not allow its filenames to start or end with a dot,
+ * or to end with a space. */
if (tmpname2[0] == '.')
tmpname2[0] = "_";
if (tmpname2[strlen(tmpname2) - 1] == '.')
tmpname2[strlen(tmpname2) - 1] = '_';
+ if (tmpname2[strlen(tmpname2) - 1] == ' ')
+ tmpname2[strlen(tmpname2) - 1] == '_';
#endif
while (folder_find_child_item_by_name(parent, tmpname2) != 0 && i < 20) {
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list