#776 "Include" feature doesn't work on windows with absolute path

6.95
open
nobody
5
2012-10-11
2009-11-30
valli
No

The "Include" feature doesn't work on windows with absolute Paths.
The problem appears while deciding if a path is absolute or relative.

Here's the reason:
...
if ( $includeFile !~ /^[\\/]/ ) {
# Correct relative include files
if ($FileConfig =~ /^(.[\\/])[^\\/]$/) {
$includeFile = "$1$includeFile";
}
}
....

An absolute Path on Windows looks like this:
F:/data/typo3conf/ext/ics_awstats/awstats/dummy.inc.conf
(Starts with a letter followed by :)

Here's the solution:
Replace this line:
if ( $includeFile !~ /^[\\/]/ ) {
... with the following line:
if ( $includeFile !~ /^([a-zA-Z]:)?[\\/]/ ) {

Would be cool if this small fix can be included in the next
awstats version.

Kind regards
valli

(this is a resubmit of bug #2314286)

Discussion

  • Added/Fixed in CVS tree. Will be available in next version.