The countFiles function ends up counting the number of files in the home directory when the directory that it is given does not exist. Although I have not noticed any issue in Code4i because of this, it causes an issue in Project Explorer (as it calls getDeployCompareFiles) where it shows that it is going to delete the contents of my home directory:
Without this fix, the issue can also be observed in the updated test where the countFiles result ends up counting the number of files in my home directory rather than the directory provided:
How to test this PR
Use the test case provided
Use Project Explorer:
Deploy your workspace
Delete the deploy location using the IFS browser
Refresh the source in the Project Explorer and observe the contents of the home directory is not visible unlike the first image above
Changes
The
countFiles
function ends up counting the number of files in the home directory when the directory that it is given does not exist. Although I have not noticed any issue in Code4i because of this, it causes an issue in Project Explorer (as it callsgetDeployCompareFiles
) where it shows that it is going to delete the contents of my home directory:Without this fix, the issue can also be observed in the updated test where the
countFiles
result ends up counting the number of files in my home directory rather than the directory provided:How to test this PR
Checklist