After #1819 is merged, hasValidTransferFileExtension in ConnectionManager.cpp can be simplified.
Currently it maintains its own hardcoded validExtensions[] array and loops over it manually. PR #1819 adds getTransferFileType() which already does the same extension lookup against the transferFileRules[] table.
hasValidTransferFileExtension should be refactored to call getTransferFileType() and return getTransferFileType(ext) != TransferFileType_Invalid, eliminating the duplicate extension list and the redundant loop.
Noted by xezon in the #1819 review.
After #1819 is merged,
hasValidTransferFileExtensioninConnectionManager.cppcan be simplified.Currently it maintains its own hardcoded
validExtensions[]array and loops over it manually. PR #1819 addsgetTransferFileType()which already does the same extension lookup against thetransferFileRules[]table.hasValidTransferFileExtensionshould be refactored to callgetTransferFileType()and returngetTransferFileType(ext) != TransferFileType_Invalid, eliminating the duplicate extension list and the redundant loop.Noted by xezon in the #1819 review.