Skip to content

Commit

Permalink
Remove trailing spaces from file name.
Browse files Browse the repository at this point in the history
Caused some problems when dragging files from the Finder on OSX.
  • Loading branch information
Alex Chabot committed Apr 5, 2012
1 parent 15630f7 commit 06d5a43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygmynote.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def escapechar(sel):
notetags = escapechar(raw_input('Tags: '))
notefile = escapechar(raw_input('Enter path to file: '))
notetype="A"
f=open(notefile, 'rb')
f=open(notefile.rstrip(), 'rb')
ablob = f.read()
f.close()
cursor.execute("INSERT INTO notes (note, tags, type, ext, file) VALUES('" + notetext + "', '" + notetags + "', '" + notetype + "', '" + notefile[-3:] + "', ?)", [sqlite.Binary(ablob)])
Expand Down

0 comments on commit 06d5a43

Please sign in to comment.