Previously, we got an index error since we were calling last on a list returned by separate, which was empty in these cases.
We match the behavior of the basename command line utility for these cases. The POSIX standard says that "" and "//" are implementation defined, so we match the Linux version in these cases ("" and "/", respectively). As per the POSIX standard, a string containing only slashes results in "/".
This fixes an old findFiles bug, so we remove the corresponding file in the bugs directory.
Previously, we got an index error since we were calling
last
on a list returned byseparate
, which was empty in these cases.We match the behavior of the
basename
command line utility for these cases. The POSIX standard says that "" and "//" are implementation defined, so we match the Linux version in these cases ("" and "/", respectively). As per the POSIX standard, a string containing only slashes results in "/".This fixes an old
findFiles
bug, so we remove the corresponding file in thebugs
directory.