875566d fixes _getFileNameParts expecting just the file and extension (/oldname/new-file-name.extension) and not the full path.
bbbcd7e checks filename length which should be 255 characters for most file systems (shame there isn't a PHP_MAXFILELENGTH)
I have tested this on Linux and Windows. Feel free to refactor as I can see the setBaseFile function getting a bit messy. Would be willing to help out with some unit tests.
Any tests are very welcome.
This module is legacy code to be honest, so it contains no tests at all so far.
Plain PHPUnit is best, having the tests use EcomDev_PHPUnit is fine, too.
875566d fixes _getFileNameParts expecting just the file and extension (
/oldname/new-file-name.extension
) and not the full path. bbbcd7e checks filename length which should be 255 characters for most file systems (shame there isn't aPHP_MAXFILELENGTH
)I have tested this on Linux and Windows. Feel free to refactor as I can see the
setBaseFile
function getting a bit messy. Would be willing to help out with some unit tests.