Skip to content

Commit

Permalink
Tools/rename.fsx: whitelist magic nuget date
Browse files Browse the repository at this point in the history
Somehow nuget folders sometimes has this weird _._ folder
that somehow doesn't show any issue when being copied
(despite its date being earlier than 1980), and always
has this strange 1979 date.
  • Loading branch information
knocte committed Jun 10, 2023
1 parent bb58c43 commit cd62ebe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tools/rename.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ let illegalCharsInExFat =
let CheckTimes(filesAndSubDirs: seq<FileSystemInfo>) =
let checkTimeStamp (entry: FileSystemInfo) (date: DateTime) =
let exFatEarliestAllowedYear = 1980
if date.Date.Year < exFatEarliestAllowedYear then
let nugetMagicFolderMagicDate = DateTime(1979, 12, 31, 16, 0, 0)

if date.ToUniversalTime() <> nugetMagicFolderMagicDate
&& date.Date.Year < exFatEarliestAllowedYear then
Console.Error.WriteLine(
sprintf
"Illegal timestamp (for exFAT) found in %s"
Expand Down

0 comments on commit cd62ebe

Please sign in to comment.