File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Flow.Launcher.Infrastructure/Storage Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -180,24 +180,20 @@ private void BackupOriginFile()
180
180
181
181
public void Save ( )
182
182
{
183
- throw new NotImplementedException ( "Save error" ) ;
184
-
185
- /*string serialized = JsonSerializer.Serialize(Data,
183
+ string serialized = JsonSerializer . Serialize ( Data ,
186
184
new JsonSerializerOptions { WriteIndented = true } ) ;
187
185
188
186
File . WriteAllText ( TempFilePath , serialized ) ;
189
187
190
- AtomicWriteSetting();*/
188
+ AtomicWriteSetting ( ) ;
191
189
}
192
190
193
191
public async Task SaveAsync ( )
194
192
{
195
- throw new NotImplementedException ( "SaveAsync error" ) ;
196
-
197
- /*await using var tempOutput = File.OpenWrite(TempFilePath);
193
+ await using var tempOutput = File . OpenWrite ( TempFilePath ) ;
198
194
await JsonSerializer . SerializeAsync ( tempOutput , Data ,
199
195
new JsonSerializerOptions { WriteIndented = true } ) ;
200
- AtomicWriteSetting();*/
196
+ AtomicWriteSetting ( ) ;
201
197
}
202
198
203
199
private void AtomicWriteSetting ( )
You can’t perform that action at this time.
0 commit comments