If the last character in a folder's name is the file separator, remove it.
ensureFolderDoesNotEndInSep(folder)
The folder name, WITHOUT the separator, if it is present.
A string, the folder name
The reason this is included is because the R function file.path
will not realise the last element is the platform's file separator,
so concatenating could result in a double slash.
The reason this is included is because the R function
file.path
will not realise the last element is
the platform's file separator, so concatenating could
result in a double slash.