Skip to content

Commit

Permalink
Fixed copying empty files
Browse files Browse the repository at this point in the history
  • Loading branch information
r57zone committed Sep 28, 2023
1 parent b9f24ee commit a4d8cbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![EN](https://user-images.githubusercontent.com/9499881/33184537-7be87e86-d096-11e7-89bb-f3286f752bc6.png)](https://github.com/r57zone/EchoBackuper/blob/master/README.md)
[![RU](https://user-images.githubusercontent.com/9499881/27683795-5b0fbac6-5cd8-11e7-929c-057833e01fb1.png)](https://github.com/r57zone/EchoBackuper/blob/master/README.RU.md)
[![DE](https://github-production-user-asset-6210df.s3.amazonaws.com/9499881/260246889-6c5b3633-6c6d-48d2-a054-d6d9e1017394.png)](https://github.com/r57zone/EchoBackuper/blob/master/README.DE.md)
← Choose language | Выберите язык
← Choose language | Выберите язык | Wählen Sie eine Sprache aus

# EchoBackuper
Application for backups. Backups are created using the echo principle. New and updated files are copied from the original folder to the backup. Renaming, moving and deleting files occurs only in the backup.
Expand Down
7 changes: 4 additions & 3 deletions Source/Unit1.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ object Main: TMain
Width = 75
Height = 25
Caption = #1054#1089#1090#1072#1085#1086#1074#1080#1090#1100
Enabled = False
TabOrder = 3
OnClick = StopBtnClick
end
Expand Down Expand Up @@ -124,11 +125,11 @@ object Main: TMain
object SaveDialog: TSaveDialog
DefaultExt = 'Backup paths|*.ebp'
Filter = 'Backup paths|*.ebp'
Left = 96
Left = 104
Top = 40
end
object ListViewPM: TPopupMenu
Left = 160
Left = 176
Top = 40
object RemSelectionBtn: TMenuItem
Caption = #1057#1085#1103#1090#1100' '#1074#1099#1076#1077#1083#1077#1085#1080#1077
Expand Down Expand Up @@ -179,7 +180,7 @@ object Main: TMain
end
end
object MainMenu: TMainMenu
Left = 224
Left = 248
Top = 40
object FileBtn: TMenuItem
Caption = #1060#1072#1081#1083
Expand Down
6 changes: 3 additions & 3 deletions Source/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function CPFile(const SourceFileName, TargetFileName: string): boolean; // Са
CopySize:=0;
Main.ProgressBar2.Position:=0;
repeat
if not ReadFile(SourceFile, Buffer, BufferSize, NumRead, nil) then break;
if (not ReadFile(SourceFile, Buffer, BufferSize, NumRead, nil)) or (NumRead = 0) then break; // NumRead = 0 для пустых файлов
if not WriteFile(TargetFile, Buffer, NumRead, NumWritten, nil) then break;
CopySize:=CopySize + NumWritten; // Inc(CopySize, NumWritten);
StatusText(ID_COPY_FILE + ' ' + IntToStr(Trunc(CopySize / SourceFileSize * 100)) + '% - ' + SourceFileName);
Expand Down Expand Up @@ -1210,8 +1210,8 @@ procedure TMain.DownBtnClick(Sender: TObject);

procedure TMain.AboutBtnClick(Sender: TObject);
begin
Application.MessageBox(PChar(Caption + ' 0.9' + #13#10 +
ID_LAST_UPDATE + ' 12.08.2023' + #13#10 +
Application.MessageBox(PChar(Caption + ' 0.9.1' + #13#10 +
ID_LAST_UPDATE + ' 28.09.2023' + #13#10 +
'https://r57zone.github.io' + #13#10 +
'r57zone@gmail.com'), PChar(ID_ABOUT_TITLE), MB_ICONINFORMATION);
end;
Expand Down

0 comments on commit a4d8cbb

Please sign in to comment.