From 396b2d0356c188f52c68e1f42bac6948a0d69d3c Mon Sep 17 00:00:00 2001 From: David Fowler Date: Mon, 13 Apr 2020 23:38:18 -0700 Subject: [PATCH] Fixed issue with docker store deletion (#366) - We were passing the wrong file name to File.Delete - Check for file existance before deletion as well. --- src/Microsoft.Tye.Hosting/ReplicaRegistry.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.Tye.Hosting/ReplicaRegistry.cs b/src/Microsoft.Tye.Hosting/ReplicaRegistry.cs index dbd40002..6ad7f934 100644 --- a/src/Microsoft.Tye.Hosting/ReplicaRegistry.cs +++ b/src/Microsoft.Tye.Hosting/ReplicaRegistry.cs @@ -56,9 +56,14 @@ namespace Microsoft.Tye.Hosting { var filePath = Path.Join(_tyeFolderPath, GetStoreFile(storeName)); + if (!File.Exists(filePath)) + { + return false; + } + try { - File.Delete(storeName); + File.Delete(filePath); return true; } catch (DirectoryNotFoundException ex)