diff --git a/Utils/Shared/Logger.m b/Utils/Shared/Logger.m index 97a8fd4e..01690732 100644 --- a/Utils/Shared/Logger.m +++ b/Utils/Shared/Logger.m @@ -40,7 +40,11 @@ % Check if log file for this application already exists - if it does close any open handles and delete it % so you can start fresh if exist(self.filename, 'file') == 2 - fds = fopen('all'); + if isMATLABReleaseOlderThan("R2025a") + fds = fopen('all'); + else + fds = openedFiles; + end for ii = 1:length(fds) filename = fopen(fds(ii)); if pathscompare(filename, self.filename)