[interchange-cvs] interchange - jon modified lib/Vend/File.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Mon Nov 10 05:55:09 UTC 2008


User:      jon
Date:      2008-11-10 05:55:09 GMT
Modified:  lib/Vend Tag: STABLE_5_6-branch File.pm
Log:
Correct logic flaw that applied UTF-8 handling in some cases where it shouldn't have.

Fixed by David Christensen <david at endpoint.com>.

Revision  Changes    Path
No                   revision



No                   revision



2.28.2.1             interchange/lib/Vend/File.pm


rev 2.28.2.1, prev_rev 2.28
Index: File.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/File.pm,v
retrieving revision 2.28
retrieving revision 2.28.2.1
diff -u -u -r2.28 -r2.28.2.1
--- File.pm	25 Mar 2008 17:13:21 -0000	2.28
+++ File.pm	10 Nov 2008 05:55:09 -0000	2.28.2.1
@@ -1,6 +1,6 @@
 # Vend::File - Interchange file functions
 #
-# $Id: File.pm,v 2.28 2008-03-25 17:13:21 jon Exp $
+# $Id: File.pm,v 2.28.2.1 2008-11-10 05:55:09 jon Exp $
 # 
 # Copyright (C) 2002-2008 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -56,18 +56,13 @@
 use File::Copy;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK $errstr);
-$VERSION = substr(q$Revision: 2.28 $, 10);
+$VERSION = substr(q$Revision: 2.28.2.1 $, 10);
 
 sub writefile {
     my($file, $data, $opt) = @_;
 
 	my $is_utf8;
-	if ($::Variable->{MV_UTF8} && ref $data) {
-		$is_utf8 = is_utf8($$data);
-	}
-	else {
-		$is_utf8 = is_utf8($data);
-	}
+	$is_utf8 = is_utf8(ref $data ? $$data : $data) if $::Variable->{MV_UTF8};
 
 	$file = ">>$file" unless $file =~ /^[|>]/;
 	if (ref $opt and $opt->{umask}) {







More information about the interchange-cvs mailing list