2026年7月16日 缓存
This commit is contained in:
@@ -271,6 +271,12 @@ void FileManageWidget::copyFiles(QListWidget *from, QListWidget *to)
|
||||
for(auto item : items) {
|
||||
auto srcPath = item->data(AbsPathRole).toString();
|
||||
auto destFilePath = destPath + QFileInfo(srcPath).fileName();
|
||||
|
||||
QFileInfo destFile(destFilePath);
|
||||
if(destFile.exists()) {
|
||||
QFile::remove(destFilePath);
|
||||
}
|
||||
|
||||
bool ret = QFile::copy(srcPath, destFilePath);
|
||||
qInfo() << "Copy: " << srcPath << " -> " << destFilePath << ", result: " << ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user