Montreal-Forced-Aligner icon indicating copy to clipboard operation
Montreal-Forced-Aligner copied to clipboard

Fixes bugs for subfolder errors

Open aqzlpm11 opened this issue 1 year ago • 0 comments

When the decompressed .zip files contain a top directory, the obtained path is incorrect.

Refefence

API of pathlib: https://docs.python.org/3/library/pathlib.html

Path.iterdir()

When the path points to a directory, yield path objects of the directory contents:

>>> p = Path('docs')
>>> for child in p.iterdir(): child
...
PosixPath('docs/conf.py')
PosixPath('docs/_templates')
PosixPath('docs/make.bat')
PosixPath('docs/index.rst')
PosixPath('docs/_build')
PosixPath('docs/_static')
PosixPath('docs/Makefile')

The children are yielded in arbitrary order, and the special entries '.' and '..' are not included. If a file is removed from or added to the directory after creating the iterator, whether a path object for that file be included is unspecified.

aqzlpm11 avatar Nov 17 '23 02:11 aqzlpm11