ProductDir — specify directory containing database files
Specify the directory containing database files.
The directory cannot be absolute, unless NoAbsolute is disabled.
The specified location is, unless absolute, treated relative to CATROOT.
This directive is also available through an alias
DataDir.
Interchange 5.7.0:
Source: lib/Vend/Config.pm
Line 3863 (context shows lines 3863-3884)
sub parse_relative_dir {
my($var, $value) = @_;
if ($Global::NoAbsolute) {
# sanity check on filenames
if (file_name_is_absolute($value)) {
config_error('Absolute path %s not allowed in %s directive',
$value, $var)
}
if ($value =~ m#^\.\./.*\.\.#) {
config_error('Path %s outside of catalog directory not allowed in %s directive',
$value, $var)
}
}
$C->{Source}{$var} = $value;
$value = "$C->{VendRoot}/$value"
unless file_name_is_absolute($value);
$value =~ s./+$..;
$value;
}