mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-29 18:49:42 +00:00
Fragment system caching working across Windows and MacOs - because it uses two hashes, one for CR and another for CRLF. Closes #490
This commit is contained in:
parent
b5854c1fa7
commit
5ad99239c5
@ -56,7 +56,7 @@ public class AsmFragmentSystemHash {
|
|||||||
long lengthLF;
|
long lengthLF;
|
||||||
long lengthCRLF;
|
long lengthCRLF;
|
||||||
if(allSystems) {
|
if(allSystems) {
|
||||||
// Calculate length for all systems by reading the file
|
// Calculate length for all systems by reading the file (slow!)
|
||||||
int fileNewlines = getFileNewlineCount(file);
|
int fileNewlines = getFileNewlineCount(file);
|
||||||
if(isSystemLF()) {
|
if(isSystemLF()) {
|
||||||
lengthLF = file.length();
|
lengthLF = file.length();
|
||||||
@ -66,7 +66,7 @@ public class AsmFragmentSystemHash {
|
|||||||
lengthCRLF = file.length();
|
lengthCRLF = file.length();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Only find length for current system - set other to zero
|
// Use filesystem length for current system only - set other to zero (fast!)
|
||||||
if(isSystemLF()) {
|
if(isSystemLF()) {
|
||||||
lengthLF = file.length();
|
lengthLF = file.length();
|
||||||
lengthCRLF = 0;
|
lengthCRLF = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user