diff --git a/Permadelete.FrontEnd/Properties/AssemblyInfo.cs b/Permadelete.FrontEnd/Properties/AssemblyInfo.cs index d3a1619..d818638 100644 --- a/Permadelete.FrontEnd/Properties/AssemblyInfo.cs +++ b/Permadelete.FrontEnd/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.5.1.0")] -[assembly: AssemblyFileVersion("0.5.1.0")] +[assembly: AssemblyVersion("0.5.2.0")] +[assembly: AssemblyFileVersion("0.5.2.0")] diff --git a/Permadelete.FrontEnd/ViewModels/OperationVM.cs b/Permadelete.FrontEnd/ViewModels/OperationVM.cs index 6270a62..7aa9b35 100644 --- a/Permadelete.FrontEnd/ViewModels/OperationVM.cs +++ b/Permadelete.FrontEnd/ViewModels/OperationVM.cs @@ -172,10 +172,17 @@ public string Size #region Methods private async void CalculateBytes() { - if (File.Exists(Path)) - _bytes = new FileInfo(Path).Length; - else if (Directory.Exists(Path)) - _bytes = await ShredderService.Instance.GetFolderSize(new DirectoryInfo(Path)); + try + { + if (File.Exists(Path)) + _bytes = new FileInfo(Path).Length; + else if (Directory.Exists(Path)) + _bytes = await ShredderService.Instance.GetFolderSize(new DirectoryInfo(Path)); + } + catch (UnauthorizedAccessException) + { + _bytes = -1; + } RaisePropertyChanged(nameof(Bytes)); RaisePropertyChanged(nameof(Size));