Browse Source

* fixed ExtractFileExt broken after previous commit

git-svn-id: trunk@10107 -
peter 17 years ago
parent
commit
496212d5c4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rtl/objpas/sysutils/fina.inc

+ 3 - 3
rtl/objpas/sysutils/fina.inc

@@ -29,7 +29,7 @@ begin
   EndSep:=AllowDirectorySeparators+AllowDriveSeparators+[ExtensionSeparator];
   while (I > 0) and not(FileName[I] in EndSep) do
     Dec(I);
-  if (I = 0) or (FileName[I] <> '.') then
+  if (I = 0) or (FileName[I] <> ExtensionSeparator) then
     I := Length(FileName)+1;
   Result := Copy(FileName, 1, I - 1) + Extension;
 end;
@@ -104,10 +104,10 @@ var
   EndSep : Set of Char;
 begin
   I := Length(FileName);
-  EndSep:=AllowDirectorySeparators+AllowDriveSeparators;
+  EndSep:=AllowDirectorySeparators+AllowDriveSeparators+[ExtensionSeparator];
   while (I > 0) and not (FileName[I] in EndSep) do
     Dec(I);
-  if (I > 0) and (FileName[I] = '.') then
+  if (I > 0) and (FileName[I] = ExtensionSeparator) then
     Result := Copy(FileName, I, MaxInt)
   else
     Result := '';