1
Description: When reviewing the destination filename is randomly generated so
2
that in the case of accidentaly choosing the destination directory equal to the
3
source directory, the source file is not deleted. Also improve the escaping of
5
Author: Paul Gevers <paul@climbing.nl>
6
Bug: http://code.google.com/p/winff/issues/detail?id=110
8
Index: winff-git/unit1.pas
9
===================================================================
10
--- winff-git.orig/unit1.pas 2011-06-13 21:21:56.094407525 +0200
11
+++ winff-git/unit1.pas 2011-06-13 21:23:07.194760086 +0200
12
@@ -1519,9 +1519,16 @@
14
filename := filelist.items[i];
15
basename := extractfilename(filename);
17
+ if preview = true then
19
+ basename := 'tmp_' + inttostr(random(10000000)) ;
22
// resolve issues with embedded quote marks in filename to be converted. issue 38
24
filename := StringReplace(filename,'"','\"',[rfReplaceAll]);
25
+ basename := StringReplace(basename,'"','\"',[rfReplaceAll]);
28
for j:= length(basename) downto 1 do
30
if basename[j] = #46 then
32
basename := leftstr(basename,j-1);
34
- basename := StringReplace(basename,'"','\"',[rfReplaceAll]);