DEADSOFTWARE

wadcvt: don't write extended info if utf8 name is the same as non-utf8 one
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Mon, 18 Apr 2016 15:22:31 +0000 (18:22 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Mon, 18 Apr 2016 15:30:23 +0000 (18:30 +0300)
src/sfs/wadcvt.dpr

index 85666cfabe50a5811e8fbb354627f3a6254fd386..46dd0a772ef6ae2733c27398ea72a6cce1b96fa1 100644 (file)
@@ -313,6 +313,7 @@ var
   sz: Word;
 begin
   fu := toUtf8(fname);
+  if fu = fname then begin result := nil; exit; end; // no need to write anything
   crc := crc32(0, @fname[1], length(fname));
   sz := 2+2+1+4+length(fu);
   SetLength(result, sz);