Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66227

open QFile with ':' in filename

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.9.3
    • Core: I/O
    • None
    • Windows 10  64bit

    Description

      QFile::open will create wrong files when the char ':' is in the filename at certain places.

       

      #include <QFile>
      #include <QDebug>
      
      int main(int, char *[])
      {
      	QFile file("./test:.txt"); //open returns true; will create file with name: ./test
      	//QFile file("./test:txt"); //open returns true; will create file with name: ./test
      	//QFile file("./:.txt"); //open returns false
      	//QFile file("./test:."); //open returns false
      	//QFile file("./:"); //open returns false
      	//QFile file("./:test"); //open returns false
      	if(file.open(QFile::WriteOnly)){
      		qDebug() << "created";
      	} else {
      		qDebug() << "not created";
      	}
      }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              thiago Thiago Macieira
              mikeee Mike Zeller
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes