Added support for the ~ path shortcut when loading flows from disk.
for consistency. Saving flows supports using paths with the ~ shortcut.
This commit is contained in:
parent
b7f864b6bb
commit
05db6e32c7
|
@ -10,6 +10,7 @@ The View:
|
||||||
"""
|
"""
|
||||||
import collections
|
import collections
|
||||||
import typing
|
import typing
|
||||||
|
import os
|
||||||
|
|
||||||
import blinker
|
import blinker
|
||||||
import sortedcontainers
|
import sortedcontainers
|
||||||
|
@ -339,6 +340,7 @@ class View(collections.Sequence):
|
||||||
"""
|
"""
|
||||||
Load flows into the view, without processing them with addons.
|
Load flows into the view, without processing them with addons.
|
||||||
"""
|
"""
|
||||||
|
path = os.path.expanduser(path)
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
for i in io.FlowReader(f).stream():
|
for i in io.FlowReader(f).stream():
|
||||||
|
|
Loading…
Reference in New Issue