Merge pull request #6722 from duplicati/feature/fix-unittest-race
Attempt to fix a race in unittests
This commit is contained in:
@@ -76,6 +76,11 @@ namespace Duplicati.Library.Main.Volumes
|
||||
|
||||
public void FinishVolume(string volumehash, long volumesize)
|
||||
{
|
||||
// If StartVolume was never called, m_writer will be null
|
||||
// This can happen if the volume was created but never used
|
||||
if (m_writer == null || m_streamwriter == null)
|
||||
return;
|
||||
|
||||
m_writer.WriteEndArray();
|
||||
m_writer.WritePropertyName("volumehash");
|
||||
m_writer.WriteValue(volumehash);
|
||||
|
||||
Reference in New Issue
Block a user