Fix decodefoldernames not applying in folder sync
sync_folder_structure wasn't applying utf7 decoding before comparing folders. This is a minimal fix that only modifies one function so it doesn't interfere with rest of the code. Signed-off-by: Stéphane Albert <sheeprine@oh.its.fake.nullplace.com> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
175d49e8a2
commit
22641331c1
@ -182,12 +182,18 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||
# Create hashes with the names, but convert the source folders
|
||||
# to the dest folder's sep.
|
||||
src_hash = {}
|
||||
src_list = []
|
||||
for folder in src_folders:
|
||||
src_hash[folder.getvisiblename().replace(
|
||||
foldername = folder.getvisiblename()
|
||||
src_list.append(foldername)
|
||||
src_hash[foldername.replace(
|
||||
src_repo.getsep(), dst_repo.getsep())] = folder
|
||||
dst_hash = {}
|
||||
dst_list = []
|
||||
for folder in dst_folders:
|
||||
dst_hash[folder.getvisiblename().replace(
|
||||
foldername = folder.getvisiblename()
|
||||
dst_list.append(foldername)
|
||||
dst_hash[foldername.replace(
|
||||
dst_repo.getsep(), src_repo.getsep())] = folder
|
||||
|
||||
# Find and create new folders on src_repo.
|
||||
@ -196,7 +202,7 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||
if not dst_repo.get_create_folders():
|
||||
break
|
||||
|
||||
if src_folder.sync_this and not src_name_t in dst_folders:
|
||||
if src_folder.sync_this and not src_name_t in dst_list:
|
||||
try:
|
||||
dst_repo.makefolder(src_name_t)
|
||||
dst_haschanged = True # Need to refresh list.
|
||||
@ -213,7 +219,7 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
|
||||
# Don't create missing folder on readonly repo.
|
||||
break
|
||||
|
||||
if dst_folder.sync_this and not dst_name_t in src_folders:
|
||||
if dst_folder.sync_this and not dst_name_t in src_list:
|
||||
# nametrans sanity check!
|
||||
# Does nametrans back&forth lead to identical names?
|
||||
# 1) would src repo filter out the new folder name? In this
|
||||
|
Loading…
Reference in New Issue
Block a user