Skip to content

Commit e8218b3

Browse files
author
tparsons
committed
BF: Sub \\ for / BEFORE subbing \ for /
1 parent 5af70c4 commit e8218b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

psychopy/experiment/params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ def __str__(self):
212212
# If param is a path or pathlike use Path to make sure it's valid (with / not \)
213213
isPathLike = bool(re.findall(r"[\\/](?!\W)", val))
214214
if self.valType in ['file', 'table'] or (isPathLike and self.canBePath):
215-
val = Path(val).as_posix()
216-
val = val.replace("\\", "/").replace("//", "/")
215+
val = val.replace("\\\\", "/")
216+
val = val.replace("\\", "/")
217217
# Hide escape char on escaped $ (other escaped chars are handled by wx but $ is unique to us)
218218
val = re.sub(r"\\\$", "$", val)
219219
# Replace line breaks with escaped line break character

0 commit comments

Comments
 (0)