diff --git a/README.txt b/README.txt index 65568a2..03e1361 100755 --- a/README.txt +++ b/README.txt @@ -1,3 +1,20 @@ +V2.6.8 – June 2016 + +In the 'Copy' tab, users can now select multiple source folders so that multiple folder content can be hashed, copied to a single destination folder, and then hashed again. Note that an experimental limit exists – if the list of files in memory exceeds 2Gb, Quickhash will likely crash. Please report such instances. If they are too many, I will implement another technique. + +In the copy tab, a bug was fixed for UNC paths when long path names were encountered. Seemingly my earlier efforts to correct this issue had not worked. Now, as of v2.6.8, long paths should not be a problem with UNC mode in the 'Copy' tab for either source or destination locations. + +For Linux users, made the UNC path fields visible, allbeit disabled, just to illustrate more clearly to the suer the full path currently selected in the treeview. + +For MD5 and SHA-1 hashes, if the handle to the file fails, a more meaningful error should be displayed rather than a standard error message that didn't tell the user or the developer much as to why the handle failed. + +The 'Stop' button in the 'Copy' tab didn't work at all I noticed! Now it does (it will abort after the file that was being copied at the time of the button press was conducted has been copied, before the next file copy starts). + +The status bar at the bottom of the 'Copy' tab now alerts the user that files are being counted after the user presses 'Go', rather than displaying nothing. + +More of the lists used in memory are Unicode enabled which may reduce crashes. + + V2.6.7 Mar 2016 The 'Expected Hash' comparison didn't kick in when the user drag and dropped a file into the 'File' tab in that QuickHash wouldn't report to the user whether the computed hash matched what he was expecting though obviously the user could still look by eye at the computed hash but nevertheless, it needed to be fixed. Ticket number 21 refers (https://sourceforge.net/p/quickhash/tickets/21/). diff --git a/project1.lpi b/project1.lpi index 973a249..3a4d2c3 100755 --- a/project1.lpi +++ b/project1.lpi @@ -19,7 +19,7 @@ - + @@ -46,11 +46,11 @@ - + - + @@ -90,8 +90,8 @@ - - + + @@ -160,7 +160,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -249,8 +249,8 @@ - - + + @@ -261,9 +261,9 @@ - - - + + + @@ -323,14 +323,14 @@ - + - + - + @@ -411,10 +411,10 @@ - + - + @@ -498,166 +498,152 @@ - - - - - - - - - - - + + - - - - + + + - - - + + + + + + + + - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - + - + - + - + - + - - + + - + @@ -676,14 +662,14 @@ - - + + diff --git a/unit2.lfm b/unit2.lfm index 1ba53e8..7452a17 100755 --- a/unit2.lfm +++ b/unit2.lfm @@ -4,7 +4,7 @@ object MainForm: TMainForm Top = 57 Width = 1018 AllowDropFiles = True - Caption = 'Quick Hash v2.6.8 BETA 3 (c) 2011-2016 - The easy and convenient way to hash data in both Linux, Apple Mac and Windows' + Caption = 'Quick Hash v2.6.8 (c) 2011-2016 - The easy and convenient way to hash data in both Linux, Apple Mac and Windows' ClientHeight = 689 ClientWidth = 1018 OnCreate = FormCreate @@ -16,10 +16,10 @@ object MainForm: TMainForm Height = 650 Top = 24 Width = 996 - ActivePage = TabSheet4 + ActivePage = TabSheet1 Anchors = [akTop, akLeft, akRight] ParentShowHint = False - TabIndex = 3 + TabIndex = 0 TabOrder = 0 OnChange = PageControl1Change object TabSheet1: TTabSheet @@ -32,11 +32,11 @@ object MainForm: TMainForm Left = 136 Height = 438 Top = 10 - Width = 814 + Width = 812 Anchors = [akTop, akLeft, akRight] Caption = 'Text Hashing' ClientHeight = 417 - ClientWidth = 810 + ClientWidth = 808 Color = clForm Font.Height = -13 ParentColor = False @@ -47,7 +47,7 @@ object MainForm: TMainForm Height = 175 Hint = 'Type or paste and watch hash value change.'#13#10'For amounts larger than several hundred Kb, save'#13#10'data to a file and use File Hashing instead. ' Top = 17 - Width = 761 + Width = 757 Anchors = [akTop, akLeft, akRight] Lines.Strings = ( 'Type or paste text here - hash will update as you type' @@ -65,7 +65,7 @@ object MainForm: TMainForm Height = 56 Hint = 'This is the hash of ALL THE TEXT in the textarea above'#13#10'For line-by-line analysis, use the button'#13#10#13#10'The hash value can be copied from here'#13#10'to clipboard (highlight and press Ctrl + C or right click ''Copy''' Top = 352 - Width = 761 + Width = 757 Anchors = [akTop, akLeft, akRight] Color = clSilver Font.Height = -13 @@ -82,7 +82,7 @@ object MainForm: TMainForm Height = 24 Hint = 'Paste an existing hash value here to see if'#13#10'the generated hash matches the computed.'#13#10'To resume normal behaviour, return value '#13#10'to ''...'' (3 dots only)' Top = 304 - Width = 761 + Width = 757 Anchors = [akTop, akLeft, akRight] EditLabel.AnchorSideLeft.Control = lbleExpectedHashText EditLabel.AnchorSideRight.Control = lbleExpectedHashText @@ -91,7 +91,7 @@ object MainForm: TMainForm EditLabel.Left = 18 EditLabel.Height = 16 EditLabel.Top = 285 - EditLabel.Width = 761 + EditLabel.Width = 757 EditLabel.Caption = 'Expected Hash Value (paste from other utility)' EditLabel.ParentColor = False ParentShowHint = False @@ -205,8 +205,8 @@ object MainForm: TMainForm object TabSheet2: TTabSheet Hint = 'Hash a single file (useful for hashing disks in Linux)' Caption = 'F&ile' - ClientHeight = 624 - ClientWidth = 988 + ClientHeight = 617 + ClientWidth = 990 ParentShowHint = False object FileHashingGroupBox: TGroupBox Left = 144 @@ -363,8 +363,8 @@ object MainForm: TMainForm object TabSheet3: TTabSheet Hint = 'Compute hashes for multiple files in a directory'#13#10'recursively, or just those in the root of the directory' Caption = 'FileS' - ClientHeight = 624 - ClientWidth = 988 + ClientHeight = 617 + ClientWidth = 990 ParentShowHint = False ShowHint = True object DirectoryHashingGroupBox: TGroupBox @@ -1036,8 +1036,8 @@ object MainForm: TMainForm end object TabSheet7: TTabSheet Caption = 'Compare Two Files' - ClientHeight = 624 - ClientWidth = 988 + ClientHeight = 617 + ClientWidth = 990 object GroupBox3: TGroupBox AnchorSideRight.Control = TabSheet7 AnchorSideRight.Side = asrBottom @@ -1195,8 +1195,8 @@ object MainForm: TMainForm object TabSheet6: TTabSheet Hint = 'Choose Directory A and compare it against Directory B to see if their contents are both the same' Caption = 'Compare Directories' - ClientHeight = 624 - ClientWidth = 988 + ClientHeight = 617 + ClientWidth = 990 object GroupBox1: TGroupBox Left = 16 Height = 471 @@ -1538,8 +1538,8 @@ object MainForm: TMainForm object TabSheet5: TTabSheet Hint = 'Compute a SHA-1 hash of a physical disk in Windows.'#13#10'Must run QuickHash as administrator with '#13#10'Windows Vista or above' Caption = 'Disks' - ClientHeight = 624 - ClientWidth = 988 + ClientHeight = 617 + ClientWidth = 990 object btnCallDiskHasherModule: TButton Left = 376 Height = 25 diff --git a/unit2.pas b/unit2.pas index f04145b..c6b19cd 100755 --- a/unit2.pas +++ b/unit2.pas @@ -18,7 +18,7 @@ Stackoverflow forums who helped me with the methodology of hashing in buffers and Taazz who pointed out where I'd made some daft mistakes. Thanks guys! - Copyright (C) 2011-2015 Ted Smith https://sourceforge.net/users/tedtechnology + Copyright (C) 2011-2016 Ted Smith https://sourceforge.net/users/tedtechnology NOTE: Date and time values, as computed in recursive directory hashing, are not daylight saving time adjusted. Source file date and time values are recorded. @@ -26,7 +26,7 @@ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. You are not granted permission to create + any later version. You are not granted permission to create another disk or file hashing tool based on this code and call it 'QuickHash'. This program is distributed in the hope that it will be useful, @@ -411,12 +411,15 @@ procedure TMainForm.FormCreate(Sender: TObject); btnCopyToClipboardA.Enabled := false; btnCopyToClipboardB.Enabled := false; - + {$ifdef Windows} + // These are the default values to be prefixed before a path to invoke the 32K + // NTFS filename length over the 260 MAX_PATH. Where the user opts for UNC paths + // as well, it becomes '\\?\UNC\' LongPathOverride := '\\?\'; // A and B below are for the Directory Comparison tab only LongPathOverrideA := '\\?\'; LongPathOverrideB := '\\?\'; - + {$endif} // In Lazarus versions < 1.4.4, the 'FileSortType' property of ShellTreeViews // would cause the listing to be doubled if anything other than fstNone was chosen // So this will ensure I have sorting until that is fixed. @@ -465,6 +468,15 @@ procedure TMainForm.FormCreate(Sender: TObject); // created for Windows users. btnCallDiskHasherModule.Enabled := false; Label8.Caption := 'LINUX USERS - Hash disks using "File" tab and navigate to /dev/sdX or /dev/sdXX as root'; + + // For Linux users, it's helpful for the user to see as a full path the folder + // they have chosen, so make source and destination edit fields visible, but + // disabled, as we don't want them to be used. + Edit2SourcePath.Visible:= true; + Edit2SourcePath.Enabled:= false; + Edit3DestinationPath.Visible:=true; + Edit3DestinationPath.Enabled:=false; + Tabsheet5.Enabled := true; Tabsheet5.Visible := true; chkCopyHidden.Enabled := true; @@ -568,7 +580,6 @@ procedure TMainForm.FormDropFiles(Sender: TObject; end; end; - procedure TMainForm.HashText(Sender: TObject); var strHashValueText : string; @@ -669,8 +680,8 @@ procedure TMainForm.btnLBLClick(Sender: TObject); begin if memoHashText.Lines.Count = 0 then begin - ShowMessage('Enter text into the text field first.'); - exit; + ShowMessage('Enter text into the text field first.'); + exit; end; try @@ -2785,7 +2796,17 @@ procedure TMainForm.ProcessDir(SourceDirName: string); {$ENDIF} {$ENDIF} frmDisplayGrid1.CopyAndHashGrid.Cells[2, i+1] := SourceFileHasHash; + {$IFDEF WINDOWS} frmDisplayGrid1.CopyAndHashGrid.Cells[3, i+1] := RemoveLongPathOverrideChars(CopiedFilePathAndName, LongPathOverride); + {$else} + {$IFDEF Darwin} + frmDisplayGrid1.CopyAndHashGrid.Cells[3, i+1] := CopiedFilePathAndName; + {$else} + {$IFDEF UNIX and !$ifdef Darwin} + frmDisplayGrid1.CopyAndHashGrid.Cells[3, i+1] := CopiedFilePathAndName; + {$endif} + {$endif} + {$endif} frmDisplayGrid1.CopyAndHashGrid.Cells[4, i+1] := DestinationFileHasHash; frmDisplayGrid1.CopyAndHashGrid.Cells[5, i+1] := CrDateModDateAccDate; frmDisplayGrid1.CopyAndHashGrid.row := i + 1; //NoOfFilesCopiedOK +1 ;