def correct_maybe_zipped(fileloc):
_, archive, filename = re.search(<EOL>r'<STR_LIT>'.format(re.escape(os.sep)), fileloc).groups()<EOL>if archive and zipfile.is_zipfile(archive):<EOL><INDENT>return archive<EOL><DEDENT>else:<EOL><INDENT>return fileloc<EOL><DEDENT>
If the path contains a folder with a .zip suffix, then
the folder is treated as a zip archive and path to zip is returned.