ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.18k stars 157 forks source link

Copying folders from a non-protonmail account to a protonmail account fails if folders that leading or tailing spaces or specific special characters #484

Open oussjarrousse opened 4 months ago

oussjarrousse commented 4 months ago

I am using Mail on Mac and the proton-bridge to copy/move folders from an account (outside of ProtonMail) to an account on ProtonMail. While moving folders works smoothly in almost all cases, there are some times that the folder is created on the destination account however an error message ensue, and the content of that folder are not copied to that folder.

Expected Behavior

Folder is created without an error, and messages are also copied.

Current Behavior

Folder is created, but an error appear, and the content of the folder are not copied to the newly created folder

Possible Solution

Add code to prevent the error. Also strip spaces from folder names.

Steps to Reproduce

  1. In a non-protonmail account create a folder with a name that has training spaces.
  2. move some messages to that folder
  3. try to copy the folder to your ProtonMail account

Version Information

Mail: Version 16.0 (3774.600.62) Proton Mail Bridge: v3.11.1