summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorWander Lairson Costa <wander.lairson@gmail.com>2020-06-23 15:21:10 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2020-07-06 10:52:54 +0200
commite797634755ae6bdd66fdf0f38273141a19da298d (patch)
tree17e57826d9e27964a0c718609d1a0d3c50d1b29d /src/lib/evil
parent2c8baa76f1c4dfaf36cc0d26cd0a979b75349f2b (diff)
windows: Fix path for file sanitization
``` > c:\ > cd /windows ``` Are valid paths. Paths starting with '\' or '/' should be considered absolute paths. Reviewed-by: Vincent Torri <vincent.torri@gmail.com> Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br> Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D12022
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/evil/evil_util.c b/src/lib/evil/evil_util.c
index f7c82c4f10..19ab64ac5d 100644
--- a/src/lib/evil/evil_util.c
+++ b/src/lib/evil/evil_util.c
@@ -197,6 +197,8 @@ evil_path_is_absolute(const char *path)
197 if (!path) 197 if (!path)
198 return 0; 198 return 0;
199 199
200 if (*path == '/' || *path == '\\') return 1;
201
200 length = strlen(path); 202 length = strlen(path);
201 if (length < 3) return 0; 203 if (length < 3) return 0;
202 204