Permalink
Browse files

Corrected typo in FileSystem.cpp; timestamp code only works on files,…

… not directories
  • Loading branch information...
Cody Jackson
Cody Jackson committed Jan 8, 2019
1 parent 94b4a84 commit 0b6d70f3c95589f3c55815f86f496bb79a889bb4
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/common/FileSystem.cpp
@@ -1142,7 +1142,8 @@ static void InternalLoadPak(const PakInfo& pak, Util::optional<uint32_t> expecte
// Save the real checksum in the list of loaded paks (empty for directories, not used for legacy paks)
loadedPaks.back().realChecksum = realChecksum;

// Get the timestamp of the pak, but only for directories. Directories don't need timestamp.
// Get the timestamp of the pak, but only for dpk files.
// Directories (aka a dpkdir) don't need timestamp.
// Fixes Windows bug where calling _wstat64i with trailing slash causes "file not found" error.
// For future stat calls on directories, trim the trailing slash (if exists)
if (pak.type == pakType_t::PAK_ZIP) {

0 comments on commit 0b6d70f

Please sign in to comment.