Ignore:
Timestamp:
Jun 5, 2007, 8:28:53 PM (18 years ago)
Author:
RBRi
Message:

refactored, now uses FileUtilsUnit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/CustomFileControls.pas

    r15 r188  
    77
    88Uses
    9   Dos, SysUtils, Classes, Forms, StdCtrls, CustomListBox, Graphics;
     9  Dos,
     10  SysUtils,
     11  Classes,
     12  Forms,
     13  StdCtrls,
     14  CustomListBox,
     15  Graphics;
    1016
    1117
     
    337343
    338344Uses
    339 {$IFDEF OS2}
    340   BseDos, OS2Def, DriveInfoUnit,
    341   BseDev, BseErr,
    342 {$ENDIF}
    343 
    344 {$IFDEF Win95}
    345   WinBase,
    346 {$ENDIF}
     345  BseDos,
     346  OS2Def,
     347  BseDev,
     348  BseErr,
     349
    347350  Dialogs,
    348   ACLStringUtility, ACLUtility, ACLFileUtility, BitmapUtility;
     351  FileUtilsUnit,
     352  ACLStringUtility,
     353  ACLUtility,
     354  BitmapUtility;
    349355
    350356var
     
    864870    Data:= longint( Items.Objects[ Index ] );
    865871    if ( Data and dfSubDir ) = 0 then
    866       FullPath:= AddSlash( S ) + FullPath;
     872      FullPath:= AddDirectorySeparator( S ) + FullPath;
    867873    dec( Index );
    868874  end;
     
    918924  SubDirs:= TStringList.Create;
    919925
    920   Status := SysUtils.FindFirst( AddSlash( Directory ) + '*.*', faDirectory, Search);
     926  Status := SysUtils.FindFirst( AddDirectorySeparator( Directory ) + '*.*', faDirectory, Search);
    921927  While Status = 0 Do
    922928  Begin
     
    967973    GetDir(Ord(UpCase(Drive))-Ord('A')+1,s);
    968974    {$I+}
    969     S:= RemoveSlash( S );
    970     S:= AddSlash( S );
     975    S:= RemoveRightDirectorySeparator( S );
     976    S:= AddDirectorySeparator( S );
    971977    NewDir:=s+NewDir;
    972978  End;
    973979
    974   NewDir:= RemoveSlash( NewDir );
     980  NewDir:= RemoveRightDirectorySeparator( NewDir );
    975981
    976982  FDirectory := NewDir;
     
    11161122      begin
    11171123        try
    1118           DriveLabel := GetVolumeLabel( DriveNumberToLetter( DriveNumber ) );
     1124          DriveLabel := GetVolumeLabel( DriveNumberToDriveLetter( DriveNumber ) );
    11191125          DriveString := DriveString + DriveLabel;
    11201126        except
     
    11421148    on EInOutError do
    11431149      // Current drive inaccessible
    1144       Drive := GetBootDrive;
     1150      Drive := GetBootDriveLetter;
    11451151  end;
    11461152End;
     
    12611267                                // and the user doesn't want to retry,
    12621268                                // so go back to boot drive.
    1263                                 SetDrive( GetBootDrive );
     1269                                SetDrive(GetBootDriveLetter);
    12641270                                Screen.Cursor := crDefault;
    12651271                                Exit;
Note: See TracChangeset for help on using the changeset viewer.