Delphi-Quellcode:
// vorher
if FileExists(aDestDir + ExtractFileName(FFileList[loc_i])) then
loc_fs := TFileStream.Create(aDestDir + ExtractFileName(FFileList[loc_i]), fmOpenWrite)
else
loc_fs := TFileStream.Create(aDestDir + ExtractFileName(FFileList[loc_i]), fmCreate);
// nachher
dateiname := aDestDir + ExtractFileName(FFileList[loc_i]);
if FileExists(dateiname) then
loc_fs := TFileStream.Create(dateiname, fmOpenWrite)
else
loc_fs := TFileStream.Create(dateiname, fmCreate);
PS: fangen eigentlich alle deine lokalen Variablen mit "loc_" an?