only move if files exist

This commit is contained in:
j 2008-10-12 13:40:25 +02:00
parent 0857b631b4
commit ef866b88d5

View file

@ -469,13 +469,14 @@ class ArchiveFile(SQLObject):
return f
def moveCache(self):
for f in os.walk(self.frameFolder_old):
os.rename(join(self.frameFolder_old, f), join(self.frameFolder, f)
for f in os.walk(self.sillFolder_old):
os.rename(join(self.sillFolder_old, f), join(self.sillFolder, f)
os.rename(self.mini_movie_file_old, self.mini_movie_file)
os.rename(self.timelineFile_old, self.timelineFile)
os.rename(self.posterStillFile_old, self.posterStillFile)
if os.path.exists(self.mini_movie_file_old):
for f in os.walk(self.frameFolder_old):
os.rename(join(self.frameFolder_old, f), join(self.frameFolder, f)
for f in os.walk(self.sillFolder_old):
os.rename(join(self.sillFolder_old, f), join(self.sillFolder, f)
os.rename(self.mini_movie_file_old, self.mini_movie_file)
os.rename(self.timelineFile_old, self.timelineFile)
os.rename(self.posterStillFile_old, self.posterStillFile)
def removeMiniMovie(self):
if exists(self.mini_movie_file):