Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Emulator/BF.File.Emulator/BfEmulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public bool TryCreateEmulatedFile(IntPtr handle, string srcDataPath, string outp
return false;

stream = emulatedBf.Stream;
_pathToEmulated.TryAdd(outputPath, emulatedBf);
_pathToEmulated[outputPath] = emulatedBf;
emulated = new EmulatedFile<Stream>(stream, emulatedBf.LastWriteTime);
_log.Info("[BfEmulator] Created Emulated file with Path {0} and Last Write {1}", outputPath, emulatedBf.LastWriteTime);

Expand Down Expand Up @@ -150,7 +150,7 @@ public void UnregisterFile(string bfPath)

public void RegisterFile(string destinationPath, Stream stream, DateTime lastWriteTime)
{
_pathToEmulated.TryAdd(destinationPath, new EmulatedBf(stream, new List<string>(), lastWriteTime));
_pathToEmulated[destinationPath] = new EmulatedBf(stream, new List<string>(), lastWriteTime);
}

private void DumpFile(string route, Stream stream)
Expand Down
4 changes: 2 additions & 2 deletions Emulator/BMD.File.Emulator/BmdEmulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public bool TryCreateEmulatedFile(IntPtr handle, string srcDataPath, string outp
return false;

stream = emulatedBmd.Stream;
_pathToEmulated.TryAdd(outputPath, emulatedBmd);
_pathToEmulated[outputPath] = emulatedBmd;
emulated = new EmulatedFile<Stream>(stream, emulatedBmd.LastWriteTime);
_log.Info("[BmdEmulator] Created Emulated file with Path {0} and Last Write {1}", outputPath, emulatedBmd.LastWriteTime);

Expand Down Expand Up @@ -149,7 +149,7 @@ public void UnregisterFile(string bmdPath)

public void RegisterFile(string destinationPath, Stream stream, DateTime lastWriteTime)
{
_pathToEmulated.TryAdd(destinationPath, new EmulatedBmd(stream, new List<string>(), lastWriteTime));
_pathToEmulated[destinationPath] = new EmulatedBmd(stream, new List<string>(), lastWriteTime);
}

private void DumpFile(string route, Stream stream)
Expand Down
2 changes: 1 addition & 1 deletion Emulator/PAK.Stream.Emulator/PakEmulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public bool TryCreateEmulatedFile(IntPtr handle, string srcDataPath, string outp

stream = builder!.Build(handle, srcDataPath);

_pathToStream.TryAdd(outputPath, stream);
_pathToStream[outputPath] = stream;
emulated = new EmulatedFile<MultiStream>(stream);
_log.Info("[PakEmulator] Created Emulated file with Path {0}", outputPath);

Expand Down
4 changes: 2 additions & 2 deletions Emulator/SPD.File.Emulator/SpdEmulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public bool TryCreateEmulatedFile(IntPtr handle, string srcDataPath, string outp
_pathToStream[outputPath] = null; // Avoid recursion into same file.

stream = builder!.Build(srcDataPath, _log);
_pathToStream.TryAdd(outputPath, stream);
_pathToStream[outputPath] = stream;
emulated = new EmulatedFile<MultiStream>(stream);
_log.Info("[SpdEmulator] Created Emulated file with Path {0}", outputPath);

Expand Down Expand Up @@ -123,7 +123,7 @@ public void UnregisterFile(string spdPath)

public void RegisterFile(string destinationPath, Stream stream)
{
_pathToStream.TryAdd(destinationPath, stream);
_pathToStream[destinationPath] = stream;
}

internal List<RouteGroupTuple> GetInput() => _builderFactory.RouteGroupTuples;
Expand Down
Loading