1

Im using the FileOpenPicker to let the User choose a file (sqlite-db), which can be anywhere on the computer:

public async Task<string> PickDb()
{
    Windows.Storage.StorageFile file = null;
    var picker = new FileOpenPicker();
    picker.FileTypeFilter.Add(".sqlite");                 
    file = await picker.PickSingleFileAsync();
    if (file != null)
        return file.Path;
    else
        return string.empty;
}

This filename is then passed over to sqlite to open a sqlite-connection.

So if the sqlite-file is in the apps home directory, the sqlite-connection is properly opened. If the file is somewhere else, the sqlite-connection gives an read-error.

I know, that UWP-Apps have limited acces to the the filesystem. but as far as I understood, a file returned by a FileOpenPicker, which was manually picked by the user, has always read-write rights.

Where am I wrong?

Tom
  • 190
  • 3
  • 18

0 Answers0