def decode_filename(filename):
    """Return Unicode filename."""
    if isinstance(filename, unicode):
        return filename

    return filename.decode(sys.getfilesystemencoding())
Return Unicode filename.