ps utilities copy file bug?

I commented out the lines below that looked inaccurate - basically it was trying to determine if path+filename was in allowed list but there isn’t logic in check availability to remove filename off of path if it was included - is this a design bug or a feature that I am not using correctly?

// *** Check if paths are on the allowed list ***
String strSourceFullPath = strSourceDirectory + System.getProperty(“file.separator”) + strFilename;
String strTargetFullPath = strTargetDirectory + System.getProperty(“file.separator”) + strFilename;
if (!checkPathValidity(strSourceDirectory, “read”))
// if (!checkPathValidity(strSourceFullPath, “read”))
throw new ServiceException(“Specified path is not on the read allowed list in the PSUtilities configuration file!”);
// if (!checkPathValidity(strTargetFullPath, “write”))
if (!checkPathValidity(strTargetDirectory, “write”))

Your correction looks correct to me. I reviewed version 2.3 code and checkPathValidity indeed expects to be passed a dir path, not a file path. The doc for copyFile also indicates that only the directory will be checked, not the full file path.