condemil/gist

Wrong behavior with identical filenames

Closed this issue · 0 comments

When I load gist that have the same filename as one of the opened gists, the content of the opened gist is replaced with loaded content. For now I use random generated folder in /tmp for every gist.

gist.py:

<             dirpath = '%s/gist%s' % (tempfile.gettempdir(), random.randrange(100000))
<             os.mkdir(dirpath)
<             view.retarget(dirpath + '/' + gist_filename)

---
>             view.retarget(tempfile.gettempdir() + '/' + gist_filename)