additional windows fix for path handling

This commit is contained in:
John Bintz 2009-12-05 15:00:34 -05:00
parent 10130125b5
commit 3fb1081afc
2 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class ComicPressMediaHandling {
function _get_regex_filename($input) {
$input = preg_replace('#\\\(?![.])#', '/', $input);
return basename($input);
return preg_replace('#^.*\/([^\/]+)$#', '$1', $input);
}
function _resolve_regex_path($input) {

View File

@ -189,6 +189,7 @@ class ComicPressMediaHandlingTest extends PHPUnit_Framework_TestCase {
array('c:\test\test2', 'test2'),
array('/test/test2\.cat', 'test2\.cat'),
array('c:\test\test2\.cat', 'test2\.cat'),
array('C:/inetpub/a\.windows\.directory/comics/2009-11-24.*\..*', '2009-11-24.*\..*')
);
}