Skip to content

Commit 16b33e6

Browse files
committed
Merge branch 'spaces'
2 parents b4a179e + 9860ca8 commit 16b33e6

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

tkfilebrowser/filebrowser.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,17 @@ def __init__(self, parent, initialdir="", initialfile="", mode="openfile",
319319
path_bm2 = join(home, ".gtk-bookmarks") # old location
320320
if exists(path_bm):
321321
with open(path_bm) as f:
322-
bm = f.readlines()
322+
bms = f.read().splitlines()
323323
elif exists(path_bm2):
324324
with open(path_bm) as f:
325-
bm = f.readlines()
325+
bms = f.read().splitlines()
326326
else:
327-
bm = []
328-
bm = [unquote(ch).replace("file://", "").split() for ch in bm]
327+
bms = []
328+
bms = [ch.split() for ch in bms]
329+
bm = []
330+
for ch in bms:
331+
ch[0] = unquote(ch[0]).replace("file://", "")
332+
bm.append(ch)
329333
for l in bm:
330334
if len(l) == 1:
331335
txt = split(l[0])[-1]

0 commit comments

Comments
 (0)