Merge lp:~jderose/filestore/ensuredir into lp:filestore
Proposed by
Jason Gerard DeRose
Status: | Merged |
---|---|
Merged at revision: | 185 |
Proposed branch: | lp:~jderose/filestore/ensuredir |
Merge into: | lp:filestore |
Diff against target: |
40 lines (+11/-7) 2 files modified
filestore.py (+6/-5) test_filestore.py (+5/-2) |
To merge this branch: | bzr merge lp:~jderose/filestore/ensuredir |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | Approve | ||
Jason Gerard DeRose | Needs Resubmitting | ||
Review via email: mp+74310@code.launchpad.net |
Description of the change
This is a small tweak to the ensuredir() function so that only one sys call to stat() or lstat() is made.
This makes ensuredir() more atomic and correct. Also should improve FileStore.
To post a comment you must log in.
's' is not a very good name for a variable. Sure, the scope is limited, but it looks like you've also got a 'd' variable nearby. I would discourage that even in a language where the variable length might matter (like client-side javascript). You might want to re-think that.
...of course, I'm only a "community" vote.