| 108 | } |
| 109 | |
| 110 | bool SubtitleMatcher::dryCopy(QString srcFilePath, QString dstFilePath) const { |
| 111 | QFile dstFile(dstFilePath), srcFile(srcFilePath); |
| 112 | bool result = false; |
| 113 | |
| 114 | if (!dstFile.open(QIODevice::WriteOnly) || |
| 115 | !srcFile.open(QIODevice::ReadOnly)) { |
| 116 | dstFile.close(); |
| 117 | } else { |
| 118 | result = dstFile.write(srcFile.readAll()) > 0; |
| 119 | srcFile.close(); |
| 120 | dstFile.close(); |
| 121 | } |
| 122 | |
| 123 | return result; |
| 124 | } |
| 125 | |
| 126 | void SubtitleMatcher::fixFilePermissions(QString targetSubtitlesFilePath, |
| 127 | QString changePermissionsTo) const { |