repository: Base: fix name of the status folder

When creating a folder on the remote, the status folder was created
using the remote folder name, but then Account assumed the statusfolder
name matched the local folder. Correct this.

Signed-off-by: Abdo Roig-Maranges <abdo.roig@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Abdo Roig-Maranges 2016-11-28 11:42:17 +01:00 committed by Nicolas Sebrecht
parent 481efa95f6
commit 5c59d3ecbf

View File

@ -242,6 +242,7 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
OfflineImapError.ERROR.REPO) OfflineImapError.ERROR.REPO)
# End sanity check, actually create the folder. # End sanity check, actually create the folder.
local_name = local_folder.getname()
try: try:
remote_repo.makefolder(remote_name) remote_repo.makefolder(remote_name)
# Need to refresh list. # Need to refresh list.
@ -250,8 +251,8 @@ class BaseRepository(CustomConfig.ConfigHelperMixin):
self.ui.error(e, exc_info()[2], "Creating folder %s on " self.ui.error(e, exc_info()[2], "Creating folder %s on "
"repository %s"% (remote_name, remote_repo)) "repository %s"% (remote_name, remote_repo))
raise raise
status_repo.makefolder(remote_name.replace( status_repo.makefolder(local_name.replace(
remote_repo.getsep(), status_repo.getsep())) local_repo.getsep(), status_repo.getsep()))
# Find and create new folders from remote to local. # Find and create new folders from remote to local.
for remote_name, remote_folder in remote_hash.items(): for remote_name, remote_folder in remote_hash.items():