From 5f4284e409208ed6b035a2b05ebec4d7b0461b32 Mon Sep 17 00:00:00 2001 From: Lucas Verney Date: Mon, 5 Sep 2016 20:28:49 +0200 Subject: [PATCH] Do not force write_playlists.php to be called from bin folder As reported in https://github.com/ampache/ampache/issues/405#issuecomment-244550648. --- bin/write_playlists.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/write_playlists.inc b/bin/write_playlists.inc index 624eb264..af1313ec 100644 --- a/bin/write_playlists.inc +++ b/bin/write_playlists.inc @@ -21,7 +21,10 @@ */ define('NO_SESSION','1'); -require_once '../lib/init.php'; + +$path = dirname(__FILE__); +$prefix = realpath($path . '/../'); +require_once($prefix . '/lib/init.php'); $valid_exts = array ('m3u', 'xspf', 'pls');