Windows: mention 'Controlled Folder Access' on ERROR_ACCESS_DENIED

If WriteFile() returns ERROR_ACCESS_DENIED and registry indicates
CFA is on, tell user rpi-imager (and fat32format) should be added
to the "allowed apps" in the CFA settings.
This commit is contained in:
Floris Bos 2020-07-06 00:42:44 +02:00
parent f90739a520
commit 385ee6d742
3 changed files with 33 additions and 5 deletions

View file

@ -24,6 +24,7 @@ public:
qint64 read(char *data, qint64 maxSize);
HANDLE handle();
QString errorString() const;
int errorCode() const;
bool flush();
bool seek(qint64 pos);
qint64 pos();
@ -34,6 +35,7 @@ protected:
bool _locked;
QString _name, _lasterror;
HANDLE _h;
int _lasterrorcode;
};
#endif // WINFILE_H