I'm running WP on a Windows server. The getImgDir function converts back-slashes to forward slashes. However, WP's somewhat awkward path_is_absolute function doesn't seem to handle the case of a path that has been converted in this way but *is* a NT file system path (it does some special casing for Windows). Therefore, that function returns false and chaos ensues. I modified getImgDir like below and now everything seems to work. Clearly, I don't know if there's another place that this should be fixed or if there's some other config configuration I have that means it shows up for me and not others. On the other hand, maybe I'm one of the very few running Windows for WP. :) Thanks for the plugin. If our artists use it, I'll be sure to post a donation.
function getImgDir(){
//prepend ABSPATH to $imgdir if it is not already there
$dirPath = str_replace(ABSPATH, '', trim($this->getValue('imgdir')));
//$dirPath = str_replace(ABSPATH, '', 'wp-content');
$dir = rtrim(ABSPATH . $dirPath, '/');
//return str_replace('\\', '/', $dir) . '/';
return $dir . '/'; //jsc
}
closed
resolved