From bee675e9f12c85c99be27e45ca5ef8a00ec05a82 Mon Sep 17 00:00:00 2001 From: ClemensF Date: Fri, 13 Dec 2019 20:28:09 +0100 Subject: [PATCH] Version 4.16.0. MapControl.WPF.csproj targets multiple frameworks. --- MapControl/WPF/ImageFileCache.WPF.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MapControl/WPF/ImageFileCache.WPF.cs b/MapControl/WPF/ImageFileCache.WPF.cs index 9c3efad7..f2015da9 100644 --- a/MapControl/WPF/ImageFileCache.WPF.cs +++ b/MapControl/WPF/ImageFileCache.WPF.cs @@ -185,11 +185,11 @@ namespace MapControl.Caching stream.Write(Encoding.ASCII.GetBytes("EXPIRES:"), 0, 8); stream.Write(BitConverter.GetBytes(imageCacheItem.Expiration.Ticks), 0, 8); } -#if !NETCOREAPP3_0 - var fileSecurity = File.GetAccessControl(path); + + var fileInfo = new FileInfo(path); + var fileSecurity = fileInfo.GetAccessControl(); fileSecurity.AddAccessRule(fullControlRule); - File.SetAccessControl(path, fileSecurity); -#endif + fileInfo.SetAccessControl(fileSecurity); } catch (Exception ex) {