| 95 | } |
| 96 | |
| 97 | bool compressDirFiles(QuaZip* zip, QString dir, QFileInfoList files, bool followSymlinks) |
| 98 | { |
| 99 | QDir directory(dir); |
| 100 | if (!directory.exists()) |
| 101 | return false; |
| 102 | |
| 103 | for (auto e : files) { |
| 104 | auto filePath = directory.relativeFilePath(e.absoluteFilePath()); |
| 105 | auto srcPath = e.absoluteFilePath(); |
| 106 | if (followSymlinks) { |
| 107 | if (e.isSymLink()) { |
| 108 | srcPath = e.symLinkTarget(); |
| 109 | } else { |
| 110 | srcPath = e.canonicalFilePath(); |
| 111 | } |
| 112 | } |
| 113 | if (!JlCompress::compressFile(zip, srcPath, filePath)) |
| 114 | return false; |
| 115 | } |
| 116 | |
| 117 | return true; |
| 118 | } |
| 119 | |
| 120 | bool compressDirFiles(QString fileCompressed, QString dir, QFileInfoList files, bool followSymlinks) |
| 121 | { |
no test coverage detected