import platform


def addSlash(p):
    """
    If string p does not end with the folder separator ('/' in OS Linux,
    '\\' in Windows, it is added.
    """

    if platform.system() == 'Windows':
        sep = '\\'
    else:
        sep = '/'

    if p.endswith(sep):
        return p
    else:
        return p + sep