[synchronicity-commits] SF.net SVN: synchronicity:[1329] trunk/Create Synchronicity
Easy, fast, and lightweight backup and synchronization app for Windows
Brought to you by:
createsoftware
From: <cre...@us...> - 2011-05-28 09:39:32
|
Revision: 1329 http://synchronicity.svn.sourceforge.net/synchronicity/?rev=1329&view=rev Author: createsoftware Date: 2011-05-28 09:39:26 +0000 (Sat, 28 May 2011) Log Message: ----------- Add extra debug information to track NTFS/FAT problems. Modified Paths: -------------- trunk/Create Synchronicity/Interface/SynchronizeForm.vb trunk/Create Synchronicity/Revision.vb Modified: trunk/Create Synchronicity/Interface/SynchronizeForm.vb =================================================================== --- trunk/Create Synchronicity/Interface/SynchronizeForm.vb 2011-05-27 22:57:51 UTC (rev 1328) +++ trunk/Create Synchronicity/Interface/SynchronizeForm.vb 2011-05-28 09:39:26 UTC (rev 1329) @@ -845,8 +845,11 @@ Private Function SourceIsMoreRecent(ByVal Source As String, ByVal Destination As String) As Boolean 'Assumes Source and Destination exist. If (Not Handler.GetSetting(Of Boolean)(ProfileSetting.PropagateUpdates, True)) Then Return False + Log.LogInfo(String.Format("SourceIsMoreRecent: {0}, {1}", Source, Destination)) + Dim SourceFATTime As Date = NTFSToFATTime(IO.File.GetLastWriteTimeUtc(Source)).AddHours(Handler.GetSetting(Of Integer)(ProfileSetting.TimeOffset, 0)) Dim DestFATTime As Date = NTFSToFATTime(IO.File.GetLastWriteTimeUtc(Destination)) + Log.LogInfo(String.Format("SourceIsMoreRecent: S:({0}, {1}); D:({2}, {3})", FormatDate(IO.File.GetLastWriteTimeUtc(Source)), FormatDate(SourceFATTime), FormatDate(IO.File.GetLastWriteTimeUtc(Destination)), FormatDate(DestFATTime))) If Handler.GetSetting(Of Boolean)(ProfileSetting.FuzzyDstCompensation, False) Then Dim HoursDiff As Integer = CInt((SourceFATTime - DestFATTime).TotalHours) @@ -938,7 +941,13 @@ #End Region #Region "Tests" + Private Shared Function FormatDate(ByVal Value As Date) As String #If DEBUG Then + Return Value.ToString("hh:mm:ss.fff") +#End If + End Function + +#If DEBUG Then Structure DatePair Dim Ntfs, FAT As Date @@ -965,10 +974,6 @@ System.Diagnostics.Debug.WriteLine("Done!") End Sub - Private Shared Function FormatDate(ByVal Value As Date) As String - Return Value.ToString("hh:mm:ss.fff") - End Function - Public Shared Sub Check_HardwareFATTimes() Using LogWriter As New IO.StreamWriter("C:\FatTimes.txt", False) LogWriter.WriteLine("Starting dynamic NTFS -> FAT tests") Modified: trunk/Create Synchronicity/Revision.vb =================================================================== --- trunk/Create Synchronicity/Revision.vb 2011-05-27 22:57:51 UTC (rev 1328) +++ trunk/Create Synchronicity/Revision.vb 2011-05-28 09:39:26 UTC (rev 1329) @@ -1,3 +1,3 @@ Module Revision - Public Const Build As String = "1327" + Public Const Build As String = "1328" End Module This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |