comparison data/fileio/FileSource.cpp @ 962:613ee830de5e

Fix return of empty string as bool value (from coverity scan, interesting the compiler doesn't mind)
author Chris Cannam
date Wed, 03 Sep 2014 09:58:31 +0100
parents b9d7352336ce
children c6f2b93a7d52
comparison
equal deleted inserted replaced
961:fae5689f7e27 962:613ee830de5e
855 dir = TempDirectory::getInstance()->getSubDirectoryPath("download"); 855 dir = TempDirectory::getInstance()->getSubDirectoryPath("download");
856 } catch (DirectoryCreationFailed f) { 856 } catch (DirectoryCreationFailed f) {
857 #ifdef DEBUG_FILE_SOURCE 857 #ifdef DEBUG_FILE_SOURCE
858 cerr << "FileSource::createCacheFile: ERROR: Failed to create temporary directory: " << f.what() << endl; 858 cerr << "FileSource::createCacheFile: ERROR: Failed to create temporary directory: " << f.what() << endl;
859 #endif 859 #endif
860 return ""; 860 return false;
861 } 861 }
862 862
863 QString filepart = m_url.path().section('/', -1, -1, 863 QString filepart = m_url.path().section('/', -1, -1,
864 QString::SectionSkipEmpty); 864 QString::SectionSkipEmpty);
865 865
913 cerr << "FileSource::createCacheFile: ERROR: Failed to create local file \"" 913 cerr << "FileSource::createCacheFile: ERROR: Failed to create local file \""
914 << filepath << "\" for URL \"" 914 << filepath << "\" for URL \""
915 << m_url.toString() << "\" (or file already exists)" << endl; 915 << m_url.toString() << "\" (or file already exists)" << endl;
916 #endif 916 #endif
917 917
918 return ""; 918 return false;
919 } 919 }
920 } 920 }
921 921
922 #ifdef DEBUG_FILE_SOURCE 922 #ifdef DEBUG_FILE_SOURCE
923 cerr << "FileSource::createCacheFile: url " 923 cerr << "FileSource::createCacheFile: url "