fix: Handling a Crestron bug where File.Exists throws an exception on 4-Series instead of returning false

This commit is contained in:
Chris Cameron
2020-10-12 11:10:49 -04:00
parent 55c0a7dc7e
commit c868034769
2 changed files with 10 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- Repeater changed to use configured callbacks instead of a dumb event
- Scheduled action callbacks allow a TimeSpan to be returned to delay actions
- Handling a Crestron bug where File.Exists throws an exception on 4-Series instead of returning false
## [13.0.0] - 2020-09-03
### Added

View File

@@ -42,8 +42,16 @@ namespace ICD.Common.Utils.IO
if (path == null)
throw new ArgumentNullException("path");
try
{
return File.Exists(path);
}
// Crestron's AdjustPathForMono method throws an exception that is inconsistent with Net Standard...
catch (Exception)
{
return false;
}
}
[PublicAPI]
public static void Copy(string pathFrom, string pathTo)