Skip to content

Commit 34aa19d

Browse files
committed
write.Conllu path=my_dir should be interpreted as path=my_dir/
1 parent 5b3ed02 commit 34aa19d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

udapi/core/basewriter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def __init__(self, files='-', filehandle=None, docname_as_file=False, encoding='
3030
raise ValueError("overwrite=1 is not compatible with files=" + files)
3131
if overwrite and docname_as_file:
3232
raise ValueError("overwrite=1 is not compatible with docname_as_file=1")
33+
# interpret path=my_dir/my_subdir as path=my_dir/my_subdir/
34+
if path and path[-1] != os.sep and '*' not in path:
35+
path += os.sep
3336
self.path = path
3437

3538
@property

0 commit comments

Comments
 (0)