diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 27a7b27..628500c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,19 +12,19 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - # Install the .NET Core workload - - name: Install .NET Core - uses: actions/setup-dotnet@v1 + # Setup .NET + - name: Setup .NET + uses: actions/setup-dotnet@v4 with: - dotnet-version: 3.1 + dotnet-version: 8.0 # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v2 # Restore the application to populate the obj folder with RuntimeIdentifiers - name: Restore the application diff --git a/FATX/FATX.csproj b/FATX/FATX.csproj index 62fcf91..f93d505 100644 --- a/FATX/FATX.csproj +++ b/FATX/FATX.csproj @@ -1,11 +1,11 @@  - netstandard2.0 + netstandard2.1 - + diff --git a/FATX/FileSystem/TimeStamp.cs b/FATX/FileSystem/TimeStamp.cs index cc8430d..d3ea6d3 100644 --- a/FATX/FileSystem/TimeStamp.cs +++ b/FATX/FileSystem/TimeStamp.cs @@ -26,6 +26,7 @@ public class TimeStamp { private uint _Time; private DateTime? _DateTime; + private readonly DateTime _minWinFileTime = new DateTime(1601, 01, 01); public TimeStamp(uint time) { @@ -70,6 +71,11 @@ public DateTime AsDateTime() { if (this._DateTime.HasValue) { + if (this._DateTime < _minWinFileTime) + { + return _minWinFileTime; + } + return this._DateTime.Value; } else @@ -97,7 +103,7 @@ public DateTime AsDateTime() } catch (Exception) { - _DateTime = DateTime.MinValue; + _DateTime = _minWinFileTime; } return _DateTime.Value; diff --git a/FATXTools/FATXTools.csproj b/FATXTools/FATXTools.csproj index 2e90d26..6766b99 100644 --- a/FATXTools/FATXTools.csproj +++ b/FATXTools/FATXTools.csproj @@ -1,6 +1,6 @@  - netcoreapp3.1 + net8.0-windows10.0.19041.0 WinExe publish\ true @@ -71,7 +71,7 @@ - 4.7.2 + 8.0.3 \ No newline at end of file