You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/12/30 21:13:23 UTC
svn commit: r491303 -
/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
Author: felicity
Date: Sat Dec 30 12:13:22 2006
New Revision: 491303
URL: http://svn.apache.org/viewvc?view=rev&rev=491303
Log:
when paths are specified in a config (such as 'include ~/foo'), things like '~' aren't properly handled. call sed_path to clean that up. also, a debug statement was improperly set to the plugin channel instead of config.
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm?view=diff&rev=491303&r1=491302&r2=491303
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm Sat Dec 30 12:13:22 2006
@@ -1196,10 +1196,13 @@
sub fix_path_relative_to_current_file {
my ($self, $path) = @_;
+ # the path may be specified as "~/foo", so deal with that
+ $path = $self->{conf}->{main}->sed_path($path);
+
if (!File::Spec->file_name_is_absolute ($path)) {
my ($vol, $dirs, $file) = File::Spec->splitpath ($self->{currentfile});
$path = File::Spec->catpath ($vol, $dirs, $path);
- dbg("plugin: fixed relative path: $path");
+ dbg("config: fixed relative path: $path");
}
return $path;
}