Changeset 405 for branches/highdpi/Packages/CevoComponents/Directories.pas
- Timestamp:
- Nov 3, 2021, 11:22:02 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/CevoComponents/Directories.pas
r246 r405 67 67 Src, Dst: TSearchRec; 68 68 begin 69 if not DirectoryExists(DestinationDir) then CreateDir(DestinationDir);69 if not DirectoryExists(DestinationDir) then ForceDirectories(DestinationDir); 70 70 if FindFirst(SourceDir + DirectorySeparator + Filter, $21, Src) = 0 then 71 71 repeat … … 79 79 end; 80 80 81 procedure CopyFiles; 82 begin 83 if DirectoryExists(GetSavedDir(True)) and not DirectoryExists(GetSavedDir(False)) then 84 CopyDir(GetSavedDir(True), GetSavedDir(False), '*.*'); 85 if DirectoryExists(GetMapsDir(True)) and not DirectoryExists(GetMapsDir(False)) then 86 CopyDir(GetMapsDir(True), GetMapsDir(False), '*.*'); 87 end; 88 81 89 procedure UnitInit; 82 90 var … … 87 95 88 96 AppDataDir := GetAppConfigDir(False); 89 if AppDataDir = '' then 90 DataDir := HomeDir 91 else 92 begin 93 if not DirectoryExists(AppDataDir) then CreateDir(AppDataDir); 97 if AppDataDir = '' then DataDir := HomeDir 98 else begin 99 if not DirectoryExists(AppDataDir) then ForceDirectories(AppDataDir); 94 100 DataDir := AppDataDir; 95 101 end; 96 97 CopyDir(GetSavedDir(True), GetSavedDir(False), '*.*'); 98 CopyDir(GetMapsDir(True), GetMapsDir(False), '*.*'); 102 CopyFiles; 99 103 end; 100 104
Note:
See TracChangeset
for help on using the changeset viewer.