Skip to content

Commit 4bd411e

Browse files
committed
Fastip adjusted so there are no warnings for 1.1 or 2.0 compilation.
1 parent 7e3b7b3 commit 4bd411e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Zip/FastZip.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,22 @@ static int MakeExternalAttributes(FileInfo info)
456456
{
457457
return (int)info.Attributes;
458458
}
459-
459+
460+
#if NET_VER_1
460461
static bool NameIsValid(string name)
461462
{
462463
return (name != null) &&
463464
(name.Length > 0) &&
464465
(name.IndexOfAny(Path.InvalidPathChars) < 0);
465466
}
466-
467+
#else
468+
static bool NameIsValid(string name)
469+
{
470+
return (name != null) &&
471+
(name.Length > 0) &&
472+
(name.IndexOfAny(Path.GetInvalidPathChars()) < 0);
473+
}
474+
#endif
467475
#endregion
468476

469477
/// <summary>

0 commit comments

Comments
 (0)