From c018fd69d96129d7faa4eb3282025bbcaffa7008 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 13 Oct 2008 14:21:13 +0200 Subject: [PATCH] fix moveCache --- oxdbarchive/model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/oxdbarchive/model.py b/oxdbarchive/model.py index e284ac5..c45cda0 100644 --- a/oxdbarchive/model.py +++ b/oxdbarchive/model.py @@ -476,8 +476,10 @@ class ArchiveFile(SQLObject): for folder, folders, files in os.walk(self.stillFolder_old): for f in files: os.rename(join(self.stillFolder_old, f), join(self.stillFolder, f)) - os.rename(self.mini_movie_file_old, self.mini_movie_file) - os.rename(self.timelineFile_old, self.timelineFile) + if os.path.exists(self.mini_movie_file_old): + os.rename(self.mini_movie_file_old, self.mini_movie_file) + if os.path.exists(self.timelineFile_old): + os.rename(self.timelineFile_old, self.timelineFile) if os.path.exists(self.posterStillFile_old): os.rename(self.posterStillFile_old, self.posterStillFile)