From d48254c1d2187dacf49f8a3374b2d329061e9c1f Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 30 Dec 2011 12:11:57 +0530 Subject: [PATCH] make sure path exists --- pandora/archive/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 7ed69840d..7b888fb18 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -244,6 +244,7 @@ class File(models.Model): format=config['formats'][0]) if created: stream.video.name = stream.name() + ox.makedirs(os.path.dirname(stream.video.path)) with open(stream.video.path, 'w') as f: f.write(chunk.read()) else: