On 2008-07-15 12:18:21 +0200, Michael Schroeder wrote:
On Mon, Jul 14, 2008 at 11:33:23PM +0200, Dirk Mueller wrote:
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;
I don't like that because it's locale dependant.
how about setting the correct locale on startup and still use the perl internals? and can we get rid of the die() error handling there? just because one submitreq is broken we dont need to kill the whole process. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org