mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-19 11:31:44 -04:00
@@ -79,6 +79,10 @@ uint32_t BinaryFilePacker::CopyBinaryFile(const string &filePath, const string &
|
||||
return RESTOOL_ERROR;
|
||||
}
|
||||
|
||||
if (ResourceUtil::IsIgnoreFile(fileType, false)) {
|
||||
return RESTOOL_SUCCESS;
|
||||
}
|
||||
|
||||
string dst = FileEntry::FilePath(packageParser_.GetOutput()).Append(RESOURCES_DIR).Append(fileType).GetPath();
|
||||
if (CopyBinaryFileImpl(filePath, dst) != RESTOOL_SUCCESS) {
|
||||
return RESTOOL_ERROR;
|
||||
|
||||
@@ -251,15 +251,15 @@ bool ResourceUtil::IsIgnoreFile(const string &filename, bool isFile)
|
||||
{
|
||||
map<string, IgnoreType> regexs;
|
||||
std::string regexSources;
|
||||
string key = filename;
|
||||
if (g_isUseCustomRegex) {
|
||||
regexs = g_userIgnoreFileRegex;
|
||||
regexSources = "user";
|
||||
} else {
|
||||
regexs = DEFAULT_IGNORE_FILE_REGEX;
|
||||
regexSources = "default";
|
||||
transform(key.begin(), key.end(), key.begin(), ::tolower);
|
||||
}
|
||||
string key = filename;
|
||||
transform(key.begin(), key.end(), key.begin(), ::tolower);
|
||||
for (const auto &iter : regexs) {
|
||||
if ((iter.second == IgnoreType::IGNORE_FILE && !isFile) ||
|
||||
(iter.second == IgnoreType::IGNORE_DIR && isFile)) {
|
||||
|
||||
Reference in New Issue
Block a user