From ea6e858dbf23cf88d2ae6d5260c8306f77cef223 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 13 Feb 2014 11:15:15 -0800 Subject: [PATCH] Fixed migration filenames, check if process has exited before waiting for exit --- src/NzbDrone.Common/Processes/ProcessProvider.cs | 6 +++++- ...40_add_metadata_tables.cs => 039_add_metadata_tables.cs} | 0 ...series.cs => 040_add_metadata_to_episodes_and_series.cs} | 0 src/NzbDrone.Core/NzbDrone.Core.csproj | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) rename src/NzbDrone.Core/Datastore/Migration/{040_add_metadata_tables.cs => 039_add_metadata_tables.cs} (100%) rename src/NzbDrone.Core/Datastore/Migration/{039_add_metadata_to_episodes_and_series.cs => 040_add_metadata_to_episodes_and_series.cs} (100%) diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs index cdb47174b..e36c86691 100644 --- a/src/NzbDrone.Common/Processes/ProcessProvider.cs +++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs @@ -189,7 +189,11 @@ namespace NzbDrone.Common.Processes public void WaitForExit(Process process) { Logger.Trace("Waiting for process {0} to exit.", process.ProcessName); - process.WaitForExit(); + + if (!process.HasExited) + { + process.WaitForExit(); + } } public void SetPriority(int processId, ProcessPriorityClass priority) diff --git a/src/NzbDrone.Core/Datastore/Migration/040_add_metadata_tables.cs b/src/NzbDrone.Core/Datastore/Migration/039_add_metadata_tables.cs similarity index 100% rename from src/NzbDrone.Core/Datastore/Migration/040_add_metadata_tables.cs rename to src/NzbDrone.Core/Datastore/Migration/039_add_metadata_tables.cs diff --git a/src/NzbDrone.Core/Datastore/Migration/039_add_metadata_to_episodes_and_series.cs b/src/NzbDrone.Core/Datastore/Migration/040_add_metadata_to_episodes_and_series.cs similarity index 100% rename from src/NzbDrone.Core/Datastore/Migration/039_add_metadata_to_episodes_and_series.cs rename to src/NzbDrone.Core/Datastore/Migration/040_add_metadata_to_episodes_and_series.cs diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 884390fd7..92c3429c2 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -195,8 +195,8 @@ - - + +