File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
DiskAccessLibrary/FileSystems/NTFS/Log Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1- /* Copyright (C) 2018 Tal Aloni <[email protected] >. All rights reserved. 1+ /* Copyright (C) 2018-2019 Tal Aloni <[email protected] >. All rights reserved. 22 *
33 * You can redistribute this program and/or modify it under the terms of
44 * the GNU Lesser Public License as published by the Free Software Foundation,
@@ -79,7 +79,15 @@ public NTFSLogClient(LogFile logFile)
7979 }
8080 else
8181 {
82- m_currentRestartRecord = ReadRestartRecord ( lastClientRestartLsn ) ;
82+ if ( ! Volume . IsReadOnly )
83+ {
84+ m_currentRestartRecord = ReadRestartRecord ( lastClientRestartLsn ) ;
85+ }
86+ else
87+ {
88+ // If volume is mounted as readonly we can skip reading the actual restart record
89+ m_currentRestartRecord = new NTFSRestartRecord ( 1 , 0 ) ;
90+ }
8391 }
8492 m_majorVersion = m_currentRestartRecord . MajorVersion ;
8593 m_minorVersion = m_currentRestartRecord . MinorVersion ;
You can’t perform that action at this time.
0 commit comments