Skip to content

Commit

Permalink
Fixed fdict key. Static type checking would have helped here.
Browse files Browse the repository at this point in the history
  • Loading branch information
hategan committed Sep 7, 2017
1 parent fb364c2 commit 2edd282
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions girderfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,10 @@ def create(self, pathstr, mode, fi=None):
# and therefore it implies open(..., O_CREAT|O_WRONLY|O_TRUNC).
#
# create an empty file locally
fdict = self._ensure_fdict(path, obj)
fdict = self._ensure_fdict(pathstr, obj)
with tempfile.NamedTemporaryFile(prefix='wtdm', delete=False) as tmp:
fdict['path'] = tmp.file
self._mark_dirty(path)
fdict['path'] = tmp.name
self._mark_dirty(pathstr)
return self.open(pathstr, mode=os.O_CREAT + os.O_WRONLY + os.O_TRUNC)

def _get_object_id_by_path(self, obj_id, path):
Expand Down

0 comments on commit 2edd282

Please sign in to comment.