def fix_folder_syntax(folder, maindir):
    """this function is used to fix slashes in the 
    directories provided by the user's settings.ini"""
    new_folder = folder
    if '\\' in folder:
        new_folder = folder.replace('\\', '/')
    if folder.endswith('/'):
        new_folder = folder[:-1]
    if new_folder.startswith('./'):
        new_folder = f'{maindir}/{new_folder[2:]}'
    return new_folder
