comparison transform/FileFeatureWriter.cpp @ 518:3cea770c6632

* crappy attempt to handle writing to directory somewhere other than C drive on Windows
author Chris Cannam
date Thu, 11 Dec 2008 12:32:59 +0000
parents 1aefb666ecfc
children 21f86744d38e
comparison
equal deleted inserted replaced
517:77b4ce536d8f 518:3cea770c6632
168 QString scheme = url.scheme().toLower(); 168 QString scheme = url.scheme().toLower();
169 bool local = (scheme == "" || scheme == "file" || scheme.length() == 1); 169 bool local = (scheme == "" || scheme == "file" || scheme.length() == 1);
170 170
171 QString dirname, basename; 171 QString dirname, basename;
172 QString infilename = url.toLocalFile(); 172 QString infilename = url.toLocalFile();
173 if (scheme.length() == 1) infilename = scheme + ":" + infilename; // DOS drive!
173 if (infilename == "") infilename = url.path(); 174 if (infilename == "") infilename = url.path();
174 basename = QFileInfo(infilename).baseName(); 175 basename = QFileInfo(infilename).baseName();
175 176
176 cerr << "trackId = " << trackId.toStdString() << ", url = " << url.toString().toStdString() << ", infilename = " 177 cerr << "trackId = " << trackId.toStdString() << ", url = " << url.toString().toStdString() << ", infilename = "
177 << infilename.toStdString() << ", basename = " << basename.toStdString() << endl; 178 << infilename.toStdString() << ", basename = " << basename.toStdString() << endl;