From 6cf15c68328bc5022f5fb728d0b688030db9d6e6 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 4 Dec 2014 12:38:23 +0000 Subject: [PATCH] implemented function for calculating drive ID --- Saviour Backup System/addBackupWizard.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Saviour Backup System/addBackupWizard.cs b/Saviour Backup System/addBackupWizard.cs index 34d710e..dff0e04 100644 --- a/Saviour Backup System/addBackupWizard.cs +++ b/Saviour Backup System/addBackupWizard.cs @@ -105,7 +105,7 @@ namespace Saviour_Backup_System cmd.Parameters.Add(new SqlCeParameter("File System", SqlDbType.NText)); cmd.Parameters.Add(new SqlCeParameter("Type", SqlDbType.NText)); cmd.Prepare(); - cmd.Parameters["Drive ID"].Value = tools.hash(drive.VolumeLabel + drive.TotalSize + drive.DriveFormat + USBTools.getDriveType(drive)); + cmd.Parameters["Drive ID"].Value = USBTools.calculateDriveID(drive); cmd.Parameters["Drive Name"].Value = drive.VolumeLabel; cmd.Parameters["Capacity"].Value = drive.TotalSize; cmd.Parameters["File System"].Value = drive.DriveFormat; @@ -123,7 +123,7 @@ namespace Saviour_Backup_System cmd.Parameters.Add(new SqlCeParameter("Previous Backups", SqlDbType.Int)); cmd.Prepare(); cmd.Parameters["Name"].Value = backupNameInput.Text; - cmd.Parameters["Drive ID"].Value = tools.hash(drive.VolumeLabel + drive.TotalSize + drive.DriveFormat + USBTools.getDriveType(drive)); + cmd.Parameters["Drive ID"].Value = USBTools.calculateDriveID(drive); cmd.Parameters["Creation Date"].Value = tools.getUnixTimeStamp(); cmd.Parameters["Backup Location"].Value = folderPath.Text; cmd.Parameters["Automatic"].Value = (insertionSwitch.Value) ? 1 : 0; //hopefully this is converted to a bit properly by SQLCE!