Feature #545: Prevent ln from linking withing the current symlink.

This commit is contained in:
Marcus van Dam
2015-06-01 16:24:45 +02:00
parent 9bbdb1b3b9
commit 83e904c9f7

View File

@@ -52,7 +52,7 @@ function awstatsDoSingleDomain($domain, $outputdir) {
// the default selection is 'current',
// so link the latest dir to it
$new_current = makeCorrectFile($outputdir . '/current');
safe_exec('ln -fs ' . escapeshellarg($staticOutputdir) . ' ' . escapeshellarg($new_current));
safe_exec('ln -fTs ' . escapeshellarg($staticOutputdir) . ' ' . escapeshellarg($new_current));
//statistics file looks like: 'awstats[month][year].[domain].txt'
$file = makeCorrectFile($staticOutputdir.'/awstats'.date('mY', time()).'.'.$domain.'.txt');