Ignore:
Timestamp:
Sep 14, 2007, 8:37:54 PM (18 years ago)
Author:
RBRi
Message:

more constants; small cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Library/FileUtilsUnit.pas

    r219 r235  
    1818  DIRECTORY_SEPARATOR = '\';
    1919  PATH_SEPARATOR = ';';
     20  CURRENT_DIRECTORY = '.';
     21  PARENT_DIRECTORY = '..';
     22  FILE_EXTENSION_DELIMITER = '.';
    2023
    2124  // Drive numbers are one based
     
    2932  LanguageEnvironmentVar = 'LANG';
    3033  DEFAULT_LANGUAGE = 'EN_US';
    31   HELP_FILE_EXTENSION = '.hlp';
     34  HELP_FILE_EXTENSION = FILE_EXTENSION_DELIMITER + 'hlp';
    3235
    3336
     
    255258    begin
    256259      tmpDirectory := tmpDirectories[i];
    257       if tmpDirectory = '..' then
     260      if tmpDirectory = PARENT_DIREcTORY then
    258261      begin
    259262        if NOT ((Length(Result) = 2) AND (Result[2] = ':')) then
     
    262265        end;
    263266      end
    264       else if tmpDirectory = '.' then
     267      else if tmpDirectory = CURRENT_DIRECTORY then
    265268      begin
    266269        ; // nothing to do
     
    515518    begin
    516519      tmpName := tmpSearchResults.Name;
    517       if (tmpName <> '.') AND (tmpName <> '..') then
     520      if (tmpName <> CURRENT_DIRECTORY) AND (tmpName <> PARENT_DIRECTORY) then
    518521      begin
    519522        aList.Add(AddDirectorySeparatorIfNotEmpty(aDirectory) + tmpSearchResults.Name );
Note: See TracChangeset for help on using the changeset viewer.