From 83e904c9f771f886c2f3592bcc3d5c00ad611f20 Mon Sep 17 00:00:00 2001 From: Marcus van Dam Date: Mon, 1 Jun 2015 16:24:45 +0200 Subject: [PATCH] Feature #545: Prevent `ln` from linking withing the current symlink. --- scripts/jobs/cron_traffic.inc.functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/jobs/cron_traffic.inc.functions.php b/scripts/jobs/cron_traffic.inc.functions.php index e708e750..65882e76 100644 --- a/scripts/jobs/cron_traffic.inc.functions.php +++ b/scripts/jobs/cron_traffic.inc.functions.php @@ -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');