On Monday 14 July 2008, Dirk Mueller wrote:
hmm, even worse, it seems the src repository is now corrupted. from a fresh checkout:
there are two more bugs in isascii() which might have caused that: - it read 0 bytes of the file at offset 4096 instead of 4096 bytes from offset 0 - a file containing a newline \r or \n was considered to be binary. anyway, I think it might be better to just use the perl builtin operator -T for it (and all the other possible bugs still lurking in 5 lines of perl). @@ -1650,12 +1650,7 @@ sub sourcediff { sub isascii { my ($file) = @_; - local *F; - open(F, '<', $file) || die("$file: $!\n"); - my $buf = ''; - sysread(F, $buf, 0, 4096); - close F; - return 1 unless $buf =~ /[\000-\037]/s; + return 1 if -T $file; return 0; } Greetings, Dirk --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org