aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ring.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-05-25 22:08:27 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-05-25 22:08:27 +0200
commitc98a2cd42babdd13eb4da9629e2d3d0953396183 (patch)
tree40cb59e494d26bfc2e42cb7f3d893510b8323cc9 /src/ring.cpp
parentbae8cd712c167522a95a093296453a54dde4a524 (diff)
downloadsciteco-c98a2cd42babdd13eb4da9629e2d3d0953396183.tar.gz
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 <EB> glob patterns.
Diffstat (limited to 'src/ring.cpp')
-rw-r--r--src/ring.cpp4
1 files changed, 2 insertions, 2 deletions
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.
*
* <file> 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()))