File tree Expand file tree Collapse file tree
NotepadStateLibrary/NotepadStateLibrary Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public string ContentString
101101 /// <summary>
102102 /// Modified Time of Saved File
103103 /// </summary>
104- public DateTime Timestamp { get ; private set ; }
104+ public DateTime ? Timestamp { get ; private set ; }
105105 /// <summary>
106106 /// <para>0 = Unsaved Tab</para>
107107 /// <para>1 = Saved Tab</para>
@@ -554,8 +554,10 @@ private void Save() //TODO: Expose this?
554554 writer . Write ( CarriageReturnType ) ;
555555 c . AddBytes ( CarriageReturnType ) ;
556556
557- writer . Write ( ( ( ulong ) Timestamp . ToFileTime ( ) ) . WriteLEB128Unsigned ( ) ) ;
558- c . AddBytes ( ( ulong ) Timestamp . ToFileTime ( ) ) ;
557+ DateTime dt = ( DateTime ) Timestamp ;
558+
559+ writer . Write ( ( ( ulong ) dt . ToFileTime ( ) ) . WriteLEB128Unsigned ( ) ) ;
560+ c . AddBytes ( ( ulong ) dt . ToFileTime ( ) ) ;
559561
560562 writer . Write ( FileHashStored ) ;
561563 c . AddBytes ( FileHashStored ) ;
You can’t perform that action at this time.
0 commit comments