Diff comments:

> === modified file 'duplicity/backends/pydrivebackend.py'
> --- duplicity/backends/pydrivebackend.py      2019-06-17 18:58:56 +0000
> +++ duplicity/backends/pydrivebackend.py      2019-11-13 02:22:24 +0000
> @@ -166,16 +166,17 @@
>              return drive_file[u'id']
>  
>      def _put(self, source_path, remote_filename):
> +        remote_filename = util.fsdecode(remote_filename)
>          drive_file = self.file_by_name(remote_filename)
>          if drive_file is None:
>              # No existing file, make a new one
> -            drive_file = self.drive.CreateFile({u'title': 
> util.fsdecode(remote_filename),
> +            drive_file = self.drive.CreateFile({u'title': remote_filename,
>                                                  u'parents': [{u"kind": 
> u"drive#fileLink",
>                                                               u"id": 
> self.folder}]})
> -            log.Info(u"PyDrive backend: creating new file '%s'" % 
> (util.fsdecode(remote_filename),))
> +            log.Info(u"PyDrive backend: creating new file '%s'" % 
> (remote_filename,))
>          else:
>              log.Info(u"PyDrive backend: replacing existing file '%s' with id 
> '%s'" % (
> -                util.fsdecode(remote_filename), drive_file[u'id']))
> +                remote_filename, drive_file[u'id']))
>          drive_file.SetContentFile(util.fsdecode(source_path.name))
>          drive_file.Upload()
>          self.id_cache[remote_filename] = drive_file[u'id']

This line is actually where the fix is despite not changing it. We want to set 
a unicode string as the cache key.



-- 
https://code.launchpad.net/~mterry/duplicity/pydrive-cache-fix/+merge/375465
Your team duplicity-team is requested to review the proposed merge of 
lp:~mterry/duplicity/pydrive-cache-fix into lp:duplicity.

_______________________________________________
Mailing list: https://launchpad.net/~duplicity-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~duplicity-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to