[qrvthtool] qrvthtool.cpp: The device name check was backwards.

It's "\\\\.\\PhysicalDrive" for Windows, and "/dev/" for Linux and other
Unix-like operating systems.
This commit is contained in:
David Korth 2023-11-25 10:41:22 -05:00
parent 64e16c74bd
commit c68875d5c0

View File

@ -119,9 +119,9 @@ int main(int argc, char *argv[])
// TODO: Better device file check.
const QString &filename = args.at(1);
#ifdef _WIN32
bool isDevice = filename.startsWith(QLatin1String("/dev/"));
#else /* !_WIN32 */
bool isDevice = filename.startsWith(QLatin1String("\\\\.\\PhysicalDrive", Qt::CaseInsensitive));
#else /* !_WIN32 */
bool isDevice = filename.startsWith(QLatin1String("/dev/"));
#endif /* _WIN32 */
window->openRvtH(QDir::fromNativeSeparators(filename), isDevice);
}