From 23f648e1adea229c8f706644abe1fdbe8ece3eb9 Mon Sep 17 00:00:00 2001 From: Maks Snegov Date: Sat, 4 Oct 2014 10:59:32 -0400 Subject: [PATCH] limit filename length with 128 chars plus extension --- nevernote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nevernote.py b/nevernote.py index 23309c2..86a9c2b 100755 --- a/nevernote.py +++ b/nevernote.py @@ -168,7 +168,7 @@ def write_file(page, title, comment=None): inc = 0 while True: inc += 1 - fname = ' '.join(title.replace('/', '_').split()) + write_inc(inc) + '.html' + fname = (' '.join(title.replace('/', '_').split()) + write_inc(inc))[:128] + '.html' if not os.path.exists(fname): break