Description
This looks like it might be related to task 107448, might be a regression and probably is Windows platform specific.
Update: QFile is capable of opening a file for write on a directory that doesn't exist.
Test case that should return 2 if directory x doesn't exist.
==================================
#include <QtGui>
class MainWidget : public QWidget {
Q_OBJECT
public:
MainWidget();
int foo();
};
int MainWidget::foo()
{ QFile writeFile("x:\out.txt"); if(!writeFile.open(QIODevice::WriteOnly)) return false; writeFile.write("foo..."; return writeFile.error()==QFile::WriteError; }MainWidget::MainWidget()
{ qDebug() << foo(); }int main(int argc, char *argv[]){
QApplication app(argc, argv);
MainWidget mainWid;
//mainWid.show();
return app.exec();
}
#include "main.moc"