Index: branches/ariel/xmldumps-backup/worker.py |
— | — | @@ -747,6 +747,13 @@ |
748 | 748 | realFileName = self._getChecksumFileName() |
749 | 749 | os.rename(tmpFileName, realFileName) |
750 | 750 | |
| 751 | + def cpMd5TmpFileToPermFile(self): |
| 752 | + if (self._enabled): |
| 753 | + tmpFileName = self._getChecksumFileNameTmp() |
| 754 | + realFileName = self._getChecksumFileName() |
| 755 | + text = FileUtils.readFile(tmpFileName) |
| 756 | + FileUtils.writeFile(self._getMd5FileDirName(), realFileName, text, self.wiki.config.fileperms) |
| 757 | + |
751 | 758 | def getChecksumFileNameBasename(self): |
752 | 759 | return ("md5sums.txt") |
753 | 760 | |
— | — | @@ -780,6 +787,9 @@ |
781 | 788 | checksum = self._md5FileLine(path) |
782 | 789 | output.write(checksum) |
783 | 790 | |
| 791 | + def _getMd5FileDirName(self): |
| 792 | + return os.path.join(self.wiki.publicDir(), self.wiki.date); |
| 793 | + |
784 | 794 | class DumpDir(object): |
785 | 795 | def __init__(self, wiki, dbName, date): |
786 | 796 | self._wiki = wiki |
— | — | @@ -1281,6 +1291,7 @@ |
1282 | 1292 | else: |
1283 | 1293 | if not self.dryrun and not self._chunkToDo: |
1284 | 1294 | self.runUpdateItemFileInfo(item) |
| 1295 | + self.checksums.cpMd5TmpFileToPermFile() |
1285 | 1296 | self.lastFailed = False |
1286 | 1297 | |
1287 | 1298 | self.status.updateStatusFiles("done") |