Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BF: ERROR path is on mount ‘0:’, start on mount ‘C:’
This was being raised when using a conditions file contained rows to control
subsets of a conditions file. The entry (e.g. 0:5 ) would look to the
code like it might be a file location (e.g. c: ) because we only used the :
to indicate a file path
  • Loading branch information
peircej committed Oct 7, 2019
1 parent 95326ca commit 2e8cd21
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions psychopy/experiment/_experiment.py
Expand Up @@ -744,16 +744,16 @@ def getPaths(filePath):
:return: dict of 'asb' and 'rel' paths or None
"""
thisFile = {}
if len(filePath) > 2 and (filePath[0] == "/" or filePath[1] == ":"):
if len(filePath) > 2 and (filePath[0] == "/" or filePath[1] == ":")\
and os.path.isfile(filePath):
thisFile['abs'] = filePath
thisFile['rel'] = os.path.relpath(filePath, srcRoot)
return thisFile
else:
thisFile['rel'] = filePath
thisFile['abs'] = os.path.normpath(join(srcRoot, filePath))
if os.path.isfile(thisFile['abs']):
return thisFile
else:
return None
if os.path.isfile(thisFile['abs']):
return thisFile

def findPathsInFile(filePath):
"""Recursively search a conditions file (xlsx or csv)
Expand Down

0 comments on commit 2e8cd21

Please sign in to comment.