PR feedback

This commit is contained in:
Konrad Pabjan 2020-07-31 19:06:56 +02:00
parent 64bec0d86c
commit 3b27c9ca28
2 changed files with 7 additions and 8 deletions

8
dist/index.js vendored
View File

@ -6307,12 +6307,12 @@ function findFilesToUpload(searchPath, globOptions) {
core_1.debug(`File:${searchResult} was found using the provided searchPath`);
searchResults.push(searchResult);
// detect any files that would be overwritten because of case insensitivity
const currentSetSize = set.size;
set.add(searchResult.toLowerCase());
if (currentSetSize === set.size) {
// set size has not changed which means paths can be overwritten
if (set.has(searchResult.toLowerCase())) {
core_1.info(`Uploads are case insensitive: ${searchResult} was detected that it will be overwritten by another file with the same path`);
}
else {
set.add(searchResult.toLowerCase());
}
}
else {
core_1.debug(`Removing ${searchResult} from rawSearchResults because it is a directory`);

View File

@ -107,13 +107,12 @@ export async function findFilesToUpload(
searchResults.push(searchResult)
// detect any files that would be overwritten because of case insensitivity
const currentSetSize = set.size
set.add(searchResult.toLowerCase())
if (currentSetSize === set.size) {
// set size has not changed which means paths can be overwritten
if (set.has(searchResult.toLowerCase())) {
info(
`Uploads are case insensitive: ${searchResult} was detected that it will be overwritten by another file with the same path`
)
} else {
set.add(searchResult.toLowerCase())
}
} else {
debug(