summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-07-19 21:57:23 -0700
committerMichael Pavone <pavone@retrodev.com>2016-07-19 21:57:23 -0700
commit1e99c2fe287ee12f962303dd01cb85cf5e444d42 (patch)
treef39afaf00ac12b577605e44079ffd596d91b0dc9 /util.c
parent543527fd5376c07d1e528ae8222f109cb884f7ee (diff)
Fix bug in ensure_dir_exists that would cause it to fail when mixed path separators were used
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 75913a4..7981efd 100644
--- a/util.c
+++ b/util.c
@@ -338,7 +338,7 @@ int ensure_dir_exists(char *path)
//so search for both
char *sep = strrchr(parent, '\\');
char *osep = strrchr(parent, '/');
- if (osep && (!sep || osep < sep)) {
+ if (osep && (!sep || osep > sep)) {
sep = osep;
}
if (!sep || sep == parent) {