avoid using absolute path in sample data

now made absolute in script, instead
This commit is contained in:
Aneurin Barker Snook
2017-07-05 21:00:13 +01:00
parent f1ce64374a
commit 00ecd4c712
3 changed files with 82 additions and 78 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ $headings = fgetcsv($csv);
while ($data = fgetcsv($csv)) {
$row = array_combine($headings, $data);
$from = $row["Sample Path"] . "/samples/" . $row["Original Bank"];
$from = $row["Project Path"] . "/samples/" . $row["Original Bank"];
$from = str_replace("~", $_SERVER["HOME"], $from);
$to = "$here/samples/" . $row["New Bank"];
if (is_link($to)) {
throw new Exception("$to exists");