732 dn = os.path.dirname(fn) |
732 dn = os.path.dirname(fn) |
733 if dn not in self.otherssubdirs: |
733 if dn not in self.otherssubdirs: |
734 self.otherssubdirs.append(dn) |
734 self.otherssubdirs.append(dn) |
735 |
735 |
736 # create hash value, if it doesn't have one |
736 # create hash value, if it doesn't have one |
737 if not self.pdata["HASH"][0]: |
737 if reader.version.startswith("5.") and not self.pdata["HASH"][0]: |
738 hash = str(QCryptographicHash.hash( |
738 hash = str(QCryptographicHash.hash( |
739 QByteArray(self.ppath.encode("utf-8")), |
739 QByteArray(self.ppath.encode("utf-8")), |
740 QCryptographicHash.Sha1).toHex(), |
740 QCryptographicHash.Sha1).toHex(), |
741 encoding="utf-8") |
741 encoding="utf-8") |
742 self.pdata["HASH"] = [hash] |
742 self.pdata["HASH"] = [hash] |
756 @return flag indicating success |
756 @return flag indicating success |
757 """ |
757 """ |
758 if self.vcs is not None: |
758 if self.vcs is not None: |
759 self.pdata["VCSOPTIONS"] = [copy.deepcopy(self.vcs.vcsGetOptions())] |
759 self.pdata["VCSOPTIONS"] = [copy.deepcopy(self.vcs.vcsGetOptions())] |
760 self.pdata["VCSOTHERDATA"] = [copy.deepcopy(self.vcs.vcsGetOtherData())] |
760 self.pdata["VCSOTHERDATA"] = [copy.deepcopy(self.vcs.vcsGetOtherData())] |
|
761 |
|
762 if not self.pdata["HASH"][0]: |
|
763 hash = str(QCryptographicHash.hash( |
|
764 QByteArray(self.ppath.encode("utf-8")), |
|
765 QCryptographicHash.Sha1).toHex(), |
|
766 encoding="utf-8") |
|
767 self.pdata["HASH"] = [hash] |
761 |
768 |
762 if fn is None: |
769 if fn is None: |
763 fn = self.pfile |
770 fn = self.pfile |
764 |
771 |
765 f = QFile(fn) |
772 f = QFile(fn) |