Skip to content

Commit 4a1bf04

Browse files
Update Source/NETworkManager.Utilities/TimestampHelper.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent cd02b96 commit 4a1bf04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/NETworkManager.Utilities/TimestampHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public static string GetTimestampFilename(string fileName)
2727
/// <remarks>This method checks only the first 14 characters of the file name for a valid timestamp and
2828
/// does not validate the remainder of the file name.</remarks>
2929
/// <param name="fileName">The file name to evaluate. The file name is expected to start with a 14-digit timestamp followed by an
30-
/// underscore or other characters.</param>
30+
/// underscore and at least one additional character.</param>
3131
/// <returns>true if the file name starts with a valid timestamp in the format "yyyyMMddHHmmss"; otherwise, false.</returns>
3232
public static bool IsTimestampedFilename(string fileName)
3333
{
34-
// Ensure the filename is long enough to contain a timestamp
35-
if (fileName.Length < 15)
34+
// Ensure the filename is long enough to contain a timestamp, an underscore, and at least one character after it
35+
if (fileName.Length < 16)
3636
return false;
3737

3838
var timestampString = fileName.Substring(0, 14);

0 commit comments

Comments
 (0)