… | |
… | |
161 | my $msg = join "", @_; |
161 | my $msg = join "", @_; |
162 | |
162 | |
163 | $msg .= "\n" |
163 | $msg .= "\n" |
164 | unless $msg =~ /\n$/; |
164 | unless $msg =~ /\n$/; |
165 | |
165 | |
166 | $msg =~ s/([\x00-\x09\x0b-\x1f])/sprintf "\\x%02x", ord $1/ge; |
166 | $msg =~ s/([\x00-\x08\x0b-\x1f])/sprintf "\\x%02x", ord $1/ge; |
167 | |
167 | |
168 | utf8::encode $msg; |
168 | utf8::encode $msg; |
169 | LOG llevError, $msg; |
169 | LOG llevError, $msg; |
170 | }; |
170 | }; |
171 | } |
171 | } |
… | |
… | |
1352 | |
1352 | |
1353 | # the original (read-only) location |
1353 | # the original (read-only) location |
1354 | sub load_path { |
1354 | sub load_path { |
1355 | my ($self) = @_; |
1355 | my ($self) = @_; |
1356 | |
1356 | |
1357 | "$MAPDIR($self->{path}" |
1357 | "$MAPDIR/$self->{path}.map" |
1358 | } |
1358 | } |
1359 | |
1359 | |
1360 | # the temporary/swap location |
1360 | # the temporary/swap location |
1361 | sub save_path { |
1361 | sub save_path { |
1362 | my ($self) = @_; |
1362 | my ($self) = @_; |
1363 | |
1363 | |
1364 | (my $path = $_[0]{path}) =~ s/\//$PATH_SEP/g; |
1364 | (my $path = $_[0]{path}) =~ s/\//$PATH_SEP/g; |
1365 | "$TMPDIR/$path" |
1365 | "$TMPDIR/$path.map" |
1366 | } |
1366 | } |
1367 | |
1367 | |
1368 | # the unique path, undef == no special unique path |
1368 | # the unique path, undef == no special unique path |
1369 | sub uniq_path { |
1369 | sub uniq_path { |
1370 | my ($self) = @_; |
1370 | my ($self) = @_; |