cpbotha / nvpy

Simplenote syncing note-taking application, inspired by Notational Velocity and ResophNotes, but uglier and cross-platformerer.
Other
850 stars 112 forks source link

If directory name inside txt_path ends with ".txt", nvpy crashes. #77

Open mkacz opened 11 years ago

mkacz commented 11 years ago

If directory name inside txt_path ends with ".txt", nvpy crashes. In my setup, /home/milosz/notes/old.txt was a directory.

cat ~/.nvpy.cfg [nvpy] simplenote_sync = 0 notes_as_txt = 1 txt_path = notes/

Traceback (most recent call last): File "/usr/local/bin/nvpy", line 9, in load_entry_point('nvpy==0.9.4', 'gui_scripts', 'nvpy')() File "/usr/local/lib/python2.7/dist-packages/nvpy/nvpy.py", line 691, in main controller = Controller() File "/usr/local/lib/python2.7/dist-packages/nvpy/nvpy.py", line 242, in init self.notes_db = NotesDB(self.config) File "/usr/local/lib/python2.7/dist-packages/nvpy/notes_db.py", line 107, in init with codecs.open(tfn, mode='rb', encoding='utf-8') as f:
File "/usr/lib/python2.7/codecs.py", line 881, in open file = builtin.open(filename, mode, buffering) IOError: [Errno 21] Is a directory: u'/home/milosz/notes/old.txt'