Author: REHSACK
Date: Mon Jun 14 06:26:21 2010
New Revision: 14139
Modified:
dbi/trunk/lib/DBD/File.pm
Log:
Provide fix for i18n issue on drop table reported by daxim
Modified: dbi/trunk/lib/DBD/File.pm
==============================================================================
--- dbi/trunk/lib/DBD/File.pm (original)
+++ dbi/trunk/lib/DBD/File.pm Mon Jun 14 06:26:21 2010
@@ -1264,17 +1264,17 @@
-f $meta->{f_fqfn} and
croak "Cannot create table $attrs->{table}: Already exists";
$fh = IO::File->new ($fn, "a+") or
- croak "Cannot open $fn for writing: $!";
- $fh->seek (0, 0) or
- croak "Error while seeking back: $!";
+ croak "Cannot open $fn for writing: $! (" . ($!+0) . ")";
}
else {
unless ($fh = IO::File->new ($fn, ($flags->{lockMode} ? "r+" : "r"))) {
- croak "Cannot open $fn: $!";
+ croak "Cannot open $fn: $! (" . ($!+0) . ")";
}
}
if ($fh) {
+ $fh->seek (0, 0) or
+ croak "Error while seeking back: $!";
if (my $enc = $meta->{f_encoding}) {
binmode $fh, ":encoding($enc)" or
croak "Failed to set encoding layer '$enc' on $fn: $!";
@@ -1292,11 +1292,11 @@
-f $fn and
croak "Cannot create table lock for $attrs->{table}: Already exists";
$fh = IO::File->new ($fn, "a+") or
- croak "Cannot open $fn for writing: $!";
+ croak "Cannot open $fn for writing: $! (" . ($!+0) . ")";
}
else {
unless ($fh = IO::File->new ($fn, ($flags->{lockMode} ? "r+" : "r"))) {
- croak "Cannot open $fn: $!";
+ croak "Cannot open $fn: $! (" . ($!+0) . ")";
}
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.