From: <ob...@us...> - 2006-05-22 09:04:22
|
Revision: 10616 Author: obones Date: 2006-05-22 02:01:51 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/jvcl/?rev=10616&view=rev Log Message: ----------- Now sets the filename correctly Modified Paths: -------------- trunk/jvcl/run/JvAppStorage.pas Modified: trunk/jvcl/run/JvAppStorage.pas =================================================================== --- trunk/jvcl/run/JvAppStorage.pas 2006-05-21 15:34:38 UTC (rev 10615) +++ trunk/jvcl/run/JvAppStorage.pas 2006-05-22 09:01:51 UTC (rev 10616) @@ -3135,12 +3135,21 @@ procedure TJvCustomAppMemoryFileStorage.SetFileName(const Value: TFileName); begin - // Mantis 3680: only add an extension if there is not already one. - if (Length(ExtractFileExt(Value)) = 0) then + if Value <> FileName then begin if not (csLoading in ComponentState) and not IsUpdating then Flush; - FFileName := PathAddExtension(Value, DefaultExtension); + + // Mantis 3680: only add an extension if there is not already one. + if (Length(ExtractFileExt(Value)) = 0) then + begin + FFileName := PathAddExtension(Value, DefaultExtension); + end + else + begin + FFileName := Value; + end; + FPhysicalReadOnly := FileExists(FullFileName) and FileIsReadOnly(FullFileName); if not (csLoading in ComponentState) and not IsUpdating then Reload; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |