If the size couldn't be determined by stat() then the file is copied to a local temp file.
| 1054 | |
| 1055 | // If the size couldn't be determined by stat() then the file is copied to a local temp file. |
| 1056 | qint64 FileAccess::sizeForReading() |
| 1057 | { |
| 1058 | if(!isLocal() && m_size == 0 && mPhysicalPath.isEmpty()) |
| 1059 | { |
| 1060 | // Size couldn't be determined. Copy the file to a local temp place. |
| 1061 | if(createLocalCopy()) |
| 1062 | { |
| 1063 | const QString localCopy = tmpFile->fileName(); |
| 1064 | const QFileInfo fi(localCopy); |
| 1065 | |
| 1066 | m_size = fi.size(); |
| 1067 | m_localCopy = localCopy; |
| 1068 | return m_size; |
| 1069 | } |
| 1070 | else |
| 1071 | { |
| 1072 | return 0; |
| 1073 | } |
| 1074 | } |
| 1075 | else |
| 1076 | return size(); |
| 1077 | } |
| 1078 | |
| 1079 | const QString& FileAccess::getStatusText() const |
| 1080 | { |