Closed thomas-tewolde closed 3 years ago
Thanks for the report @thomas-tewolde. To reproduce, can you provide the Exception details, please?
@hanssens thanks, i Have updated the issue description with the Exception thrown.
I suggest a solution for this to pass file as a stream instead
using (var stream = System.IO.File.OpenRead(@"C:\Users\xxx\Desktop\.env"))
{
LocalStorage.Load(stream);
}
In the stacktrace I see you where attempting to write to 'C:\Program Files (x86)\xxxxx.localstorage'. That would require elevated permissions indeed. It's better to perhaps use %APPDATA% or some similar location that's meant for this.
Writing to a system directory, like %PROGRAMFILES%, will not be possible without having elevated permissions.
Next, if your suggestion to improve loading the file as a stream, by all means please setup a PR for it. I'll happily look at it accordingly.
Hi I cant perform any method unless I have an admin privilege, is it possible to save the storage file in a user defined path.