~ubuntu-branches/ubuntu/precise/winff/precise

« back to all changes in this revision

Viewing changes to debian/patches/prevent_overwrite_on_preview

  • Committer: Package Import Robot
  • Author(s): Paul Gevers
  • Date: 2012-01-12 21:42:51 UTC
  • mfrom: (4.2.9 sid)
  • Revision ID: package-import@ubuntu.com-20120112214251-jcfcnmraero64v2l
Tags: 1.4.1-1
* Import upstream version 1.4.1
* Remove all patches, now applied upsteam
* Update d/presets.xml and d/presets-libavcodec53.xml with upstream
  changes
* Update d/control to depend on libav-tools as (near future)
  replacement for ffmpeg
* Add patch to remove win32 as target OS to allow building
* Add patch to prevent unnecessary linking against libraries
* Add patch to allow the debugging symbols to be generated

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
4
 
 quotes.
5
 
Author: Paul Gevers <paul@climbing.nl>
6
 
Bug: http://code.google.com/p/winff/issues/detail?id=110
7
 
 
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 @@
13
 
      begin
14
 
        filename := filelist.items[i];
15
 
        basename := extractfilename(filename);
16
 
+
17
 
+       if preview = true then
18
 
+       begin
19
 
+         basename := 'tmp_' + inttostr(random(10000000)) ;
20
 
+       end;    
21
 
+
22
 
        // resolve issues with embedded quote marks in filename to be converted.  issue 38
23
 
        {$ifdef unix}
24
 
        filename := StringReplace(filename,'"','\"',[rfReplaceAll]);
25
 
+       basename := StringReplace(basename,'"','\"',[rfReplaceAll]);
26
 
        {$endif}
27
 
 
28
 
        for j:= length(basename) downto 1  do
29
 
@@ -1529,9 +1536,6 @@
30
 
            if basename[j] = #46 then
31
 
               begin
32
 
                 basename := leftstr(basename,j-1);
33
 
-                {$ifdef unix}
34
 
-                basename := StringReplace(basename,'"','\"',[rfReplaceAll]);
35
 
-                {$endif}
36
 
                 break;
37
 
               end;
38
 
          end;