From c98a2cd42babdd13eb4da9629e2d3d0953396183 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 25 May 2015 22:08:27 +0200 Subject: restrict globbing in the EB command to regular files. As SciTECO can only edit regular files (or symlinks to regular files), we can exclude directories from the list of files matched by glob patterns. --- src/ring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ring.cpp') diff --git a/src/ring.cpp b/src/ring.cpp index f944e40..906e72a 100644 --- a/src/ring.cpp +++ b/src/ring.cpp @@ -306,7 +306,7 @@ StateEditFile::do_edit(tecoInt id) * mode. * * may also be a glob pattern, in which case - * all files matching the pattern are opened/edited. + * all regular files matching the pattern are opened/edited. * Globbing is performed exactly the same as the * EN command does. * @@ -368,7 +368,7 @@ StateEditFile::done(const gchar *str) } if (is_glob_pattern(str)) { - Globber globber(str); + Globber globber(str, G_FILE_TEST_IS_REGULAR); gchar *filename; while ((filename = globber.next())) -- cgit v1.2.3