View Issue Details

IDProjectCategoryView StatusLast Update
0025965LazarusPatchpublic2014-04-04 13:45
Reporterocean Assigned ToMattias Gaertner  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.3 (SVN) 
Summary0025965: TrimFilename is wrong
Descriptionif TrimFilename(' test ')<>'test' then showmessage('Bug');

Likely regression, patch attached
TagsNo tags attached.
Fixed in Revision44591
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

ocean

2014-04-03 11:47

reporter  

lazfileutils.pas.patch (625 bytes)   
Index: components/lazutils/lazfileutils.pas
===================================================================
--- components/lazutils/lazfileutils.pas	(revision 44589)
+++ components/lazutils/lazfileutils.pas	(working copy)
@@ -570,9 +570,9 @@
     Start := 1;
     while (Start <= Len) and (AFilename[Start] = #32) do Inc(Start);
     System.Delete(Result,1,Start-1);
-    Len := Length(AFileName);
+    Len := Length(Result);
   end;
-  while (Len > 0) and (AFileName[Len] = #32) do Dec(Len);
+  while (Len > 0) and (Result[Len] = #32) do Dec(Len);
   SetLength(Result, Len);
   Result := ResolveDots(Result);
 end;
lazfileutils.pas.patch (625 bytes)   

Mattias Gaertner

2014-04-03 12:21

manager   ~0074139

Thanks.

Issue History

Date Modified Username Field Change
2014-04-03 11:47 ocean New Issue
2014-04-03 11:47 ocean File Added: lazfileutils.pas.patch
2014-04-03 12:21 Mattias Gaertner Fixed in Revision => 44591
2014-04-03 12:21 Mattias Gaertner LazTarget => -
2014-04-03 12:21 Mattias Gaertner Note Added: 0074139
2014-04-03 12:21 Mattias Gaertner Status new => resolved
2014-04-03 12:21 Mattias Gaertner Resolution open => fixed
2014-04-03 12:21 Mattias Gaertner Assigned To => Mattias Gaertner
2014-04-04 13:45 ocean Status resolved => closed