gauteh / lieer

Fast email-fetching, sending, and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
555 stars 62 forks source link

Error with filenames #210

Closed HaoZeke closed 2 months ago

HaoZeke commented 2 years ago

The tmp file uses : as a separator which somehow doesn't play nice with ArchLinux if not others.

 gmi pull --force                                   
pull: full synchronization (forced)
fetching messages:   0%|                                                  | 0/1 [00:00<?, ?it/s]pull: previous pull can be resumed using --resume
fetching messages: 43692it [00:56, 778.83it/s]                                                  
removing deleted: 0it [00:00, ?it/s]
receiving content:   0%|                                    | 1/43692 [00:00<9:16:03,  1.31it/s]Traceback (most recent call last):
  File "/$HOME/.asdf/installs/python/3.9.7/bin/gmi", line 24, in <module>
    g.main ()
  File "/$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/gmailieer.py", line 219, in main
    args.func (args)
  File "/$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/gmailieer.py", line 412, in pull
    self.full_pull ()
  File "/$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/gmailieer.py", line 661, in full_pull
    updated = self.get_content(message_gids)
  File "/$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/gmailieer.py", line 756, in get_content
    self.remote.get_messages (need_content, _got_msgs, 'raw')
  File "$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/remote.py", line 133, in func_wrap
    return func (self, *args, **kwargs)
  File "/$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/remote.py", line 384, in get_messages
    cb (msg_batch)
  File "/$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/gmailieer.py", line 754, in _got_msgs
    self.local.store (m, db)
  File "/$HOME/.asdf/installs/python/3.9.7/lib/python3.9/site-packages/lieer/local.py", line 571, in store
    with open (tmp_p, 'wb') as fd:
FileNotFoundError: [Errno 2] No such file or directory: '/run/media/Store/.mail/gmail/mail/tmp/17ed6ce572acfccc:2,'
receiving content:   0%|                                    | 1/43692 [00:00<9:35:17,  1.27it/s]
HaoZeke commented 2 years ago

Actually this is a limitation of the filesystem I have, extFAT has trouble with :. Similar issues are present for NTFS.

For reference, mbsync allows the setting of FieldDelimiter _ or something else to not use :.

gauteh commented 2 years ago

The : is part of the maildir specification, and is expected by e-mail clients (and notmuch).