[synchronicity-commits] SF.net SVN: synchronicity:[1150] trunk
Easy, fast, and lightweight backup and synchronization app for Windows
Brought to you by:
createsoftware
From: <cre...@us...> - 2011-02-28 19:01:45
|
Revision: 1150 http://synchronicity.svn.sourceforge.net/synchronicity/?rev=1150&view=rev Author: createsoftware Date: 2011-02-28 19:01:38 +0000 (Mon, 28 Feb 2011) Log Message: ----------- Fix last modified time for compressed files. Important note: The code currently uses the Destination file time before applying time offsets. This is fine on files mirrored using Copy, but not on files mirrored using Compress. Changing this may result in wrongly applied time offsets; this should be further explored. Modified Paths: -------------- trunk/Compressor/GZipCompressor.vb trunk/Create Synchronicity/My Project/AssemblyInfo.vb trunk/Create Synchronicity/SynchronizeForm.vb Modified: trunk/Compressor/GZipCompressor.vb =================================================================== --- trunk/Compressor/GZipCompressor.vb 2011-02-24 11:21:23 UTC (rev 1149) +++ trunk/Compressor/GZipCompressor.vb 2011-02-28 19:01:38 UTC (rev 1150) @@ -44,6 +44,8 @@ End Select End Using End Using + + IO.File.SetLastWriteTimeUtc(DestFile, IO.File.GetLastWriteTimeUtc(SourceFile)) End Sub Sub DecompressFile(ByVal SourceFile As String, ByVal DestFile As String) Modified: trunk/Create Synchronicity/My Project/AssemblyInfo.vb =================================================================== --- trunk/Create Synchronicity/My Project/AssemblyInfo.vb 2011-02-24 11:21:23 UTC (rev 1149) +++ trunk/Create Synchronicity/My Project/AssemblyInfo.vb 2011-02-28 19:01:38 UTC (rev 1150) @@ -43,7 +43,7 @@ <Assembly: AssemblyVersion("5.1.*")> #If DEBUG Then -<Assembly: AssemblyFileVersion("5.2011.2.24")> +<Assembly: AssemblyFileVersion("5.2011.2.28")> #Else <Assembly: AssemblyFileVersion("5.1.0.0")> #End If Modified: trunk/Create Synchronicity/SynchronizeForm.vb =================================================================== --- trunk/Create Synchronicity/SynchronizeForm.vb 2011-02-24 11:21:23 UTC (rev 1149) +++ trunk/Create Synchronicity/SynchronizeForm.vb 2011-02-28 19:01:38 UTC (rev 1150) @@ -879,7 +879,7 @@ IO.File.Copy(SourceFile, DestFile, True) End If - If Handler.GetSetting(ConfigOptions.TimeOffset, "0") <> "0" Then + If Handler.GetSetting(ConfigOptions.TimeOffset, "0") <> "0" Then 'Updating attributes is needed. #If DEBUG Then Log.LogInfo("DST: """ & DestFile & """ has been copied with attributes " & IO.File.GetAttributes(DestFile) & " , now setting attributes to Normal before setting Last Write Time") #End If @@ -887,6 +887,7 @@ #If DEBUG Then Log.LogInfo("DST: Attributes set to" & IO.File.GetAttributes(DestFile) & " on """ & Path & """, now setting last write time.") #End If + 'TODO: Check if s/DestFile/SourceFile would change something (I guess it would) IO.File.SetLastWriteTimeUtc(DestFile, IO.File.GetLastWriteTimeUtc(DestFile).AddHours(Handler.GetSetting(ConfigOptions.TimeOffset, "0"))) End If This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |