From c6f1a231a328b2c810f6082e0385cd5626bafe19 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 12 Oct 2008 15:53:25 +0000 Subject: [PATCH] BUGFIX Fixed CSVParser assumptions about absolute unix-style filepaths - using Director::absFile() instead now git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64096 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- dev/CSVParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/CSVParser.php b/dev/CSVParser.php index 701ae46be..7c82958cb 100644 --- a/dev/CSVParser.php +++ b/dev/CSVParser.php @@ -70,7 +70,7 @@ class CSVParser extends Object implements Iterator { * @param $enclosure The character for quoting or enclosing columns */ function __construct($filename, $delimiter = ",", $enclosure = '"') { - if($filename['0'] != '/') $filename = Director::baseFolder() . '/' . $filename; + $filename = Director::getAbsFile($filename); $this->filename = $filename; $tis->delimiter = ","; $this->enclosure = '"';