+
+ // Add missing hashes to source files
+ if ((DoSHA1 == true && !Tags.Exists("Checksums-Sha1")) ||
+ (DoSHA256 == true && !Tags.Exists("Checksums-Sha256")) ||
+ (DoSHA512 == true && !Tags.Exists("Checksums-Sha512")))
+ {
+ if (Db.GetFileInfo(OriginalPath,
+ false, /* DoControl */
+ false, /* DoContents */
+ false, /* GenContentsOnly */
+ false, /* DoSource */
+ DoMD5, DoSHA1, DoSHA256, DoSHA512,
+ DoAlwaysStat) == false)
+ {
+ return _error->Error("Error getting file info");
+ }
+
+ if (DoSHA1 == true && !Tags.Exists("Checksums-Sha1"))
+ ostreamSha1 << "\n " << string(Db.SHA1Res) << " "
+ << Db.GetFileSize() << " " << ParseJnk;
+
+ if (DoSHA256 == true && !Tags.Exists("Checksums-Sha256"))
+ ostreamSha256 << "\n " << string(Db.SHA256Res) << " "
+ << Db.GetFileSize() << " " << ParseJnk;
+
+ if (DoSHA512 == true && !Tags.Exists("Checksums-Sha512"))
+ ostreamSha512 << "\n " << string(Db.SHA512Res) << " "
+ << Db.GetFileSize() << " " << ParseJnk;
+
+ // write back the GetFileInfo() stats data
+ Db.Finish();
+ }
+
+ // Perform the delinking operation
+ char Jnk[2];
+