Changeset 113 for trunk/Components


Ignore:
Timestamp:
Feb 3, 2018, 11:32:34 AM (7 years ago)
Author:
chronos
Message:
  • Added: All map files downloadable for original game.
  • Fixed: Copy map files from program files to application data.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/Directories.pas

    r112 r113  
    7979
    8080  // Copy appdata if not done yet
    81   if FindFirst(HomeDir + 'AppData' + DirectorySeparator + 'Saved' + DirectorySeparator + '*.cevo', $21, src) = 0 then
     81  if FindFirst(HomeDir + 'Saved' + DirectorySeparator + '*.cevo', $21, src) = 0 then
    8282    repeat
    8383      if (FindFirst(DataDir + 'Saved' + DirectorySeparator + src.Name, $21, dst) <> 0) or
    8484        (dst.Time < src.Time) then
    85         CopyFile(PChar(HomeDir + 'AppData' + DirectorySeparator + 'Saved' + DirectorySeparator + src.Name),
     85        CopyFile(PChar(HomeDir + 'Saved' + DirectorySeparator + src.Name),
    8686          PChar(DataDir + 'Saved' + DirectorySeparator + src.Name), false);
     87      FindClose(dst);
     88    until FindNext(src) <> 0;
     89  FindClose(src);
     90
     91  // Copy appdata if not done yet
     92  if FindFirst(HomeDir + 'Maps' + DirectorySeparator + '*.*', $21, src) = 0 then
     93    repeat
     94      if (FindFirst(DataDir + 'Maps' + DirectorySeparator + src.Name, $21, dst) <> 0) or
     95        (dst.Time < src.Time) then
     96        CopyFile(PChar(HomeDir + 'Maps' + DirectorySeparator + src.Name),
     97          PChar(DataDir + 'Maps' + DirectorySeparator + src.Name), false);
    8798      FindClose(dst);
    8899    until FindNext(src) <> 0;
Note: See TracChangeset for help on using the changeset viewer.