Do not create folders on readonly repositories
1) Rename the unintuitive repository.syncfoldersto() to sync_folder_structure() 2) We were checking if the local repository is readonly and then turning off any folder creation. But as we can create folders on a remote repository too, we need to be more fine grained here. Just don't create a folder on the repository that is marked readonly=True. This still does not do away with the error message that one currently gets on missing local folders. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
@ -289,10 +289,10 @@ class SyncableAccount(Account):
|
||||
localrepos.getfolders()
|
||||
statusrepos.getfolders()
|
||||
|
||||
remoterepos.sync_folder_structure(localrepos, statusrepos)
|
||||
# replicate the folderstructure between REMOTE to LOCAL
|
||||
if not localrepos.getconfboolean('readonly', False):
|
||||
self.ui.syncfolders(remoterepos, localrepos)
|
||||
remoterepos.syncfoldersto(localrepos, statusrepos)
|
||||
|
||||
# iterate through all folders on the remote repo and sync
|
||||
for remotefolder in remoterepos.getfolders():
|
||||
|
Reference in New Issue
Block a user