Skip to content

Commit

Permalink
applied fix from david-hughes, solves issue cloudmatrix#97 and cloudm…
Browse files Browse the repository at this point in the history
…atrix#47

Update fails during second update requiring admin rights under Windowssaf
  • Loading branch information
timeyyy committed Jan 23, 2016
1 parent 6b95672 commit 8270912
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions esky/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ def _workdir(self,app,nm,create=True):
updir = app._get_update_dir()
workdir = os.path.join(updir,nm)
if create:
# the failure of this may raise an error which notifies us to try root access
if os.path.exists(workdir) and len(os.listdir(workdir)) == 0:
try:
os.rmdir(workdir)
except OSError:
raise
for target in (updir,workdir):
try:
os.mkdir(target)
Expand Down

0 comments on commit 8270912

Please sign in to comment.