Skip to content

Commit

Permalink
revert ncli/ncli_common.nim changes; 19969 evidently wasn't backporte…
Browse files Browse the repository at this point in the history
…d to 1.6
  • Loading branch information
tersec committed Jan 20, 2023
1 parent bab22a7 commit 949a4d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ncli/ncli_common.nim
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ func matchFilenameUnaggregatedFiles(filename: string): bool =
# epochNumberRegexStr & epochFileNameExtension
filename.len == epochInfoFileNameDigitsCount + epochFileNameExtension.len and
filename.endsWith(epochFileNameExtension) and
# TODO can't be used with JS backend:
# TODO should use toOpenArray, but
# https://github.com/nim-lang/Nim/issues/15952
allIt(filename.toOpenArray(0, epochInfoFileNameDigitsCount - 1), it.isDigit)
# https://github.com/nim-lang/Nim/issues/19969
allIt(filename[0 ..< epochInfoFileNameDigitsCount], it.isDigit)

static:
for filename in [
Expand All @@ -95,9 +96,10 @@ func matchFilenameAggregatedFiles(filename: string): bool =
# epochNumberRegexStr & "_" & epochNumberRegexStr & epochFileNameExtension
filename.len == epochInfoFileNameDigitsCount * 2 + "_".len + epochFileNameExtension.len and
filename.endsWith(epochFileNameExtension) and
# TODO can't be used with JS backend:
# TODO should use toOpenArray, but
# https://github.com/nim-lang/Nim/issues/15952
allIt(filename.toOpenArray(0, epochInfoFileNameDigitsCount - 1), it.isDigit) and
# https://github.com/nim-lang/Nim/issues/19969
allIt(filename[0 ..< epochInfoFileNameDigitsCount], it.isDigit) and
filename[epochInfoFileNameDigitsCount] == '_' and
allIt(
filename[epochInfoFileNameDigitsCount + 1 ..< 2 * epochInfoFileNameDigitsCount + 1],
Expand Down

0 comments on commit 949a4d2

Please sign in to comment.