diff --git a/emcc b/emcc index 135fbfde4..45df432df 100755 --- a/emcc +++ b/emcc @@ -751,13 +751,13 @@ else: def in_temp(name): return os.path.join(temp_dir, os.path.basename(name)) -def in_directory( root, child ): - #make both absolute +def in_directory(root, child): + # make both path absolute root = os.path.realpath(root) child = os.path.realpath(child) - #return true, if the common prefix of both is equal to directory - #e.g. /a/b/c/d.rst and directory is /a/b, the common prefix is /a/b + # return true, if the common prefix of both is equal to directory + # e.g. /a/b/c/d.rst and directory is /a/b, the common prefix is /a/b return os.path.commonprefix([root, child]) == root # Parses the essential suffix of a filename, discarding Unix-style version numbers in the name. For example for 'libz.so.1.2.8' returns '.so'