mirror of
https://github.com/fadden/nulib2.git
synced 2024-06-10 01:29:30 +00:00
The test for really long filename extensions was broken.
This commit is contained in:
parent
486cae404e
commit
80c9b78516
|
@ -182,10 +182,14 @@ AddPreservationString(NulibState* pState,
|
|||
pExt = nil;
|
||||
else
|
||||
pExt = FindExtension(pState, pathBuf);
|
||||
if (pExt != nil && strlen(pExt+1) < kMaxExtLen) {
|
||||
if (pExt != nil) {
|
||||
pExt++; /* skip past the '.' */
|
||||
|
||||
/* if it's strictly decimal-numeric, don't use it (.1, .2, etc) */
|
||||
if (strlen(pExt) >= kMaxExtLen) {
|
||||
/* too long, forget it */
|
||||
pExt = nil;
|
||||
} else {
|
||||
/* if strictly decimal-numeric, don't use it (.1, .2, etc) */
|
||||
(void) strtoul(pExt, &end, 10);
|
||||
if (*end == '\0') {
|
||||
pExt = nil;
|
||||
|
@ -200,6 +204,7 @@ AddPreservationString(NulibState* pState,
|
|||
ccp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user