This python file detection code is flawed. os.path.dirname() returns the full name of path/to/file; in order to just get file, you need to call os.path.basename() as well.
Additionally, metadir is not a relative import as it stands now. Appending the full folder name allows the rest of the files to be found as well.
This python file detection code is flawed.
os.path.dirname()
returns the full name ofpath/to/file
; in order to just getfile
, you need to callos.path.basename()
as well.Additionally,
metadir
is not a relative import as it stands now. Appending the full folder name allows the rest of the files to be found as well.