File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Flow.Launcher.Infrastructure/Storage Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1- using System . IO ;
1+ using System ;
2+ using System . IO ;
23using System . Threading . Tasks ;
34using Flow . Launcher . Infrastructure . Logger ;
45using Flow . Launcher . Infrastructure . UserSettings ;
@@ -40,6 +41,16 @@ public BinaryStorage(string filename)
4041 FilePath = Path . Combine ( DirectoryPath , $ "{ filename } { FileSuffix } ") ;
4142 }
4243
44+ // Let the old Program plugin get this constructor
45+ [ Obsolete ( "This constructor is obsolete. Use BinaryStorage(string filename) instead." ) ]
46+ public BinaryStorage ( string filename , string directoryPath = null ! )
47+ {
48+ directoryPath ??= DataLocation . CacheDirectory ;
49+ FilesFolders . ValidateDirectory ( directoryPath ) ;
50+
51+ FilePath = Path . Combine ( directoryPath , $ "{ filename } { FileSuffix } ") ;
52+ }
53+
4354 public async ValueTask < T > TryLoadAsync ( T defaultData )
4455 {
4556 if ( Data != null ) return Data ;
You can’t perform that action at this time.
0 commit comments