Skip to content

Commit e4ba749

Browse files
committed
ADD: Option to copy file backward without prompt (fixes doublecmd#2611)
1 parent 961a7e2 commit e4ba749

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/uglobs.pas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ tDesiredDropTextFormat=record
500500
gDragAndDropAskFormatEachTime: Boolean;
501501
gDragAndDropTextAutoFilename: Boolean;
502502
gDragAndDropSaveUnicodeTextInUFT8: Boolean;
503+
gAutoCopyBackward: Boolean;
503504
gNtfsHourTimeDelay: Boolean;
504505
gAutoExtractOpenMask: String;
505506
gFileOperationsProgressKind: TFileOperationsProgressKind;
@@ -1982,6 +1983,7 @@ procedure SetDefaultConfigGlobs;
19821983
gDragAndDropAskFormatEachTime := False;
19831984
gDragAndDropTextAutoFilename := False;
19841985
gDragAndDropSaveUnicodeTextInUFT8 := True;
1986+
gAutoCopyBackward := True;
19851987
gNtfsHourTimeDelay := False;
19861988
gAutoExtractOpenMask := EmptyStr;
19871989
gFileOperationsProgressKind := fopkSeparateWindow;
@@ -2948,6 +2950,7 @@ procedure LoadXmlConfig;
29482950
gDragAndDropAskFormatEachTime := GetValue(Node,'DragAndDropAskFormatEachTime', gDragAndDropAskFormatEachTime);
29492951
gDragAndDropTextAutoFilename := GetValue(Node, 'DragAndDropTextAutoFilename', gDragAndDropTextAutoFilename);
29502952
gDragAndDropSaveUnicodeTextInUFT8 := GetValue(Node, 'DragAndDropSaveUnicodeTextInUFT8', gDragAndDropSaveUnicodeTextInUFT8);
2953+
gAutoCopyBackward := GetValue(Node, 'AutoCopyBackward', gAutoCopyBackward);
29512954
gNtfsHourTimeDelay := GetValue(Node, 'NtfsHourTimeDelay', gNtfsHourTimeDelay);
29522955
gAutoExtractOpenMask := GetValue(Node, 'AutoExtractOpenMask', gAutoExtractOpenMask);
29532956
gSearchDefaultTemplate := GetValue(Node, 'SearchDefaultTemplate', gSearchDefaultTemplate);
@@ -3634,6 +3637,7 @@ procedure SaveXmlConfig;
36343637
SetValue(Node, 'DragAndDropAskFormatEachTime', gDragAndDropAskFormatEachTime);
36353638
SetValue(Node, 'DragAndDropTextAutoFilename', gDragAndDropTextAutoFilename);
36363639
SetValue(Node, 'DragAndDropSaveUnicodeTextInUFT8', gDragAndDropSaveUnicodeTextInUFT8);
3640+
SetValue(Node, 'AutoCopyBackward', gAutoCopyBackward);
36373641
SetValue(Node, 'NtfsHourTimeDelay', gNtfsHourTimeDelay);
36383642
SetValue(Node, 'AutoExtractOpenMask', gAutoExtractOpenMask);
36393643
SetValue(Node, 'SearchDefaultTemplate', gSearchDefaultTemplate);

src/ushowform.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ procedure TEditorWaitData.Done;
503503
begin
504504
FileTime:= mbFileAge(Files[I].FullPath);
505505
if (FileTime = FileTimes[I]) or
506-
(not msgYesNo(Format(rsMsgCopyBackward, [GetRelativeFileName(Files[I].FullPath)]) + LineEnding + LineEnding + GetFromPath)) then
506+
(not (gAutoCopyBackward or msgYesNo(Format(rsMsgCopyBackward, [GetRelativeFileName(Files[I].FullPath)]) + LineEnding + LineEnding + GetFromPath))) then
507507
begin
508508
Files.Delete(I);
509509
end

0 commit comments

Comments
 (0)