# Buggy code
def __init__(self, connection, base, index=(), data=None):
    """Make new QuotedRPath"""
    super().__init__(connection, base, index, data)
    self.quoted_index = tuple(map(quote, self.index))
    # we need to recalculate path and data on the basis of
    # quoted_index (parent class does it on the basis of index)
    if base is not None:
        self.path = self.path_join(self.base, *self.quoted_index)
        if data is None:
            self.setdata()


# Traceback (OSError)
C:\Users\vmtest\Desktop>C:\Users\vmtest\Downloads\rdiff-backup-1.4.0b0-win64.exe
test_base test_destination
Exception '[WinError 123] La syntaxe du nom de fichier, de répertoire ou de volu
me est incorrecte: b'test_destination/rdiff-backup-data/current_mirror.2019-12-1
5T08:36:05-05:00.data'' raised of class '<class 'OSError'>':
File "rdiff_backup\Main.py", line 384, in error_check_Main
File "rdiff_backup\Main.py", line 406, in Main
File "rdiff_backup\Main.py", line 342, in take_action
File "rdiff_backup\Main.py", line 422, in Backup
File "rdiff_backup\Main.py", line 609, in backup_final_init
File "rdiff_backup\Main.py", line 1112, in checkdest_if_necessary
File "rdiff_backup\Main.py", line 1076, in checkdest_need_check
File "rdiff_backup\restore.py", line 56, in get_inclist
File "rdiff_backup\rpath.py", line 1375, in append
File "rdiff_backup\FilenameMapping.py", line 146, in __init__
File "rdiff_backup\rpath.py", line 1047, in __init__
File "rdiff_backup\rpath.py", line 1073, in setdata
File "rdiff_backup\rpath.py", line 352, in make_file_dict

Traceback (most recent call last):
File "rdiff-backup", line 32, in <module>
File "rdiff_backup\Main.py", line 384, in error_check_Main
File "rdiff_backup\Main.py", line 406, in Main
File "rdiff_backup\Main.py", line 342, in take_action
File "rdiff_backup\Main.py", line 422, in Backup
File "rdiff_backup\Main.py", line 609, in backup_final_init
File "rdiff_backup\Main.py", line 1112, in checkdest_if_necessary
File "rdiff_backup\Main.py", line 1076, in checkdest_need_check
File "rdiff_backup\restore.py", line 56, in get_inclist
File "rdiff_backup\rpath.py", line 1375, in append
File "rdiff_backup\FilenameMapping.py", line 146, in __init__
File "rdiff_backup\rpath.py", line 1047, in __init__
File "rdiff_backup\rpath.py", line 1073, in setdata
File "rdiff_backup\rpath.py", line 352, in make_file_dict
OSError: [WinError 123] La syntaxe du nom de fichier, de répertoire ou de volume
est incorrecte: b'test_destination/rdiff-backup-data/current_mirror.2019-12-15T
08:36:05-05:00.data'
[3504] Failed to execute script rdiff-backup

# Fixed code
def __init__(self, connection, base, index=(), data=None):
    """Make new QuotedRPath"""
    # we avoid handing over "None" as data so that the parent
    # class doesn't try to gather data of an unquoted filename
    # Caution: this works only because RPath checks on "None"
    #          and its parent RORPath on True/False.
    super().__init__(connection, base, index, data or False)
    self.quoted_index = tuple(map(quote, self.index))
    # we need to recalculate path and data on the basis of
    # quoted_index (parent class does it on the basis of index)
    if base is not None:
        self.path = self.path_join(self.base, *self.quoted_index)
        if data is None:
            self.setdata()