motschel123 / Mac-Contact-Sync-Obsidian

GNU Affero General Public License v3.0
9 stars 2 forks source link

Does not sync contacts whose (company) names contain commas #11

Closed antifuchs closed 2 months ago

antifuchs commented 3 months ago

I had a few contacts in my DB whose names have a comma in them, for example Johnny Appleseed, Sr. and a company Sheaffer Mechanical\, LLC. These seem like legitimate names to have, but when syncing, the plugin complains:

in plugin:sync-contacts-macos:824
Error syncing Sheaffer Mechanical\, LLC
Error: ENOENT: no such file or directory, open '/Users/asf/Library/Mobile Documents/iCloud~md~obsidian/Documents/notes/Contacts/Sheaffer Mechanical/, LLC.md'
eval @ plugin:sync-contacts-macos:824

I hope this is sufficient for diagnosing the issue; for now, I have removed the commas from these contacts' names, but would love to add them back so they are properly formatted again. Please let me know if I can provide more data to debug this with!

motschel123 commented 3 months ago

Seems like the comma messes with file creation. I'll take a look at it and test it myself.

motschel123 commented 2 months ago

Seems like commas are exported/parsed from vCards in a funny way.

Names with commas should no longer be an Issue in the latest version.

antifuchs commented 2 months ago

That’s awesome, thanks!