diff --git a/README.md b/README.md index 941fd81..d6d23ce 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,6 @@ Packages published on [NuGet](https://www.nuget.org/packages/InsaneGenius.Utilit ## External Data -- ISO 639-2 language data is sourced from the [ISO 639-2 Registration Authority](https://www.loc.gov/standards/iso639-2/langhome.html) [download](https://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt) -- ISO 639-3 language data is sourced from the [ISO 639-3 Registration Authority](https://iso639-3.sil.org/) [download](https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab). -- RFC 5646 / BCP 47 language data is sourced from the [IANA Tags for Identifying Languages RFC 5646](https://www.rfc-editor.org/rfc/rfc5646.html) [download](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). +- ISO 639-2 language data is sourced from the [ISO 639-2 Registration Authority](https://www.loc.gov/standards/iso639-2/langhome.html), [download](https://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt) +- ISO 639-3 language data is sourced from the [ISO 639-3 Registration Authority](https://iso639-3.sil.org/), [download](https://iso639-3.sil.org/sites/iso639-3/files/downloads/iso-639-3.tab). +- RFC 5646 / BCP 47 language data is sourced from the [IANA Tags for Identifying Languages RFC 5646](https://www.rfc-editor.org/rfc/rfc5646.html), [download](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). diff --git a/Sandbox/Sandbox.csproj b/Sandbox/Sandbox.csproj index 16d5c64..5d2dc61 100644 --- a/Sandbox/Sandbox.csproj +++ b/Sandbox/Sandbox.csproj @@ -7,7 +7,7 @@ - + diff --git a/Utilities/FileEx.cs b/Utilities/FileEx.cs index 374a0c6..419dfa2 100644 --- a/Utilities/FileEx.cs +++ b/Utilities/FileEx.cs @@ -360,9 +360,16 @@ public static bool IsFileReadWriteable(FileInfo fileInfo) // Test if all files in the directory are readable public static bool AreFilesInDirectoryReadable(string directory) { - // Test each file in directory for readability - DirectoryInfo dirInfo = new(directory); - return dirInfo.EnumerateFiles("*.*", SearchOption.TopDirectoryOnly).All(IsFileReadable); + try + { + // Test each file in directory for readability + DirectoryInfo dirInfo = new(directory); + return dirInfo.EnumerateFiles("*.*", SearchOption.TopDirectoryOnly).All(IsFileReadable); + } + catch (Exception e) when(LogOptions.Logger.LogAndHandle(e, MethodBase.GetCurrentMethod()?.Name)) + { + return false; + } } // Create directory if it does not already exists diff --git a/UtilitiesTests/UtilitiesTests.csproj b/UtilitiesTests/UtilitiesTests.csproj index 6649f3a..f737418 100644 --- a/UtilitiesTests/UtilitiesTests.csproj +++ b/UtilitiesTests/UtilitiesTests.csproj @@ -22,7 +22,7 @@ - +