fixed an oopsie with exclusions
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
"quality": "medium",
|
||||
"blocksize": "10x10",
|
||||
"colorprofile": "cl",
|
||||
"clean": false,
|
||||
"custom": [
|
||||
{
|
||||
"asset": "assets/shared/images/resultScreen/",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"name": "astc-compressor",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "2da942476abebbc7f47e0b228f89320e8ef07167",
|
||||
"ref": "9b0819150b67bf0d49145f250099b75d21be5839",
|
||||
"url": "https://github.com/KarimAkra/astc-compressor"
|
||||
},
|
||||
{
|
||||
|
||||
+6
-6
@@ -1762,27 +1762,27 @@ class Project extends HXProject
|
||||
astcExcludes[i] = astcExcludes[i].trim();
|
||||
}
|
||||
|
||||
public function isASTCExcluded(filePath:String):Bool
|
||||
public function isASTCExcluded(file:String):Bool
|
||||
{
|
||||
for (exclusion in astcExcludes)
|
||||
{
|
||||
if (exclusion.endsWith("/"))
|
||||
{
|
||||
var normalizedFilePath = Path.normalize(filePath);
|
||||
var normalizedExclusion = Path.normalize(exclusion.substr(0, exclusion.length - 2));
|
||||
var normalizedFilePath = Path.normalize(file);
|
||||
var normalizedExclusion = Path.normalize(exclusion);
|
||||
|
||||
if (normalizedFilePath.startsWith(normalizedExclusion)) return true;
|
||||
}
|
||||
else if (exclusion.endsWith("/*"))
|
||||
{
|
||||
var normalizedExclusion = Path.normalize(exclusion);
|
||||
var fileDirectory = Path.directory(Path.normalize(filePath));
|
||||
var normalizedExclusion = Path.normalize(exclusion.substr(0, exclusion.length - 2));
|
||||
var fileDirectory = Path.directory(Path.normalize(file));
|
||||
|
||||
if (fileDirectory == normalizedExclusion) return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (filePath == exclusion) return true;
|
||||
if (file == exclusion) return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user