Expand ~ with :dump-page.

This commit is contained in:
Florian Bruhin 2015-11-24 18:04:10 +01:00
parent b37dac7bfa
commit 35de87f973

View File

@ -20,6 +20,7 @@
"""Command dispatcher for TabbedBrowser.""" """Command dispatcher for TabbedBrowser."""
import os import os
import os.path
import shlex import shlex
import posixpath import posixpath
import functools import functools
@ -1241,6 +1242,8 @@ class CommandDispatcher:
else: else:
data = mainframe.toHtml() data = mainframe.toHtml()
dest = os.path.expanduser(dest)
try: try:
with open(dest, 'w', encoding='utf-8') as f: with open(dest, 'w', encoding='utf-8') as f:
f.write(data) f.write(data)