Skip to content

Commit

Permalink
Create ~/Activities if it doesn't exist yet #1400
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomeu Vizoso committed Sep 20, 2009
1 parent f0998bb commit 5683aaa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/cpsection/updater/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ def _get_temp_file_path(self, uri):
urlparse(uri)
path = os.path.basename(path)

if not os.path.exists(env.get_user_activities_path()):
os.makedirs(env.get_user_activities_path())

base_name, extension_ = os.path.splitext(path)
fd, file_path = tempfile.mkstemp(dir=env.get_user_activities_path(),
prefix=base_name, suffix='.xo')
Expand Down

0 comments on commit 5683aaa

Please sign in to comment.