Skip to content

Commit

Permalink
fix: [io]Ejecting a USB flash drive indicates that it is in use, resu…
Browse files Browse the repository at this point in the history
…lting in incomplete copied data

hen copying to a USB drive, there is no waiting for synchronization to complete. If it is copying or cutting, wait for synchronization to complete (the USB drive is 100%).

Log: Ejecting a USB flash drive indicates that it is in use, resulting in incomplete copied data
Bug: https://pms.uniontech.com/bug-view-202519.html
  • Loading branch information
liyigang1 authored and deepin-bot[bot] committed Jun 2, 2023
1 parent d9de114 commit 64b01bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dde-file-manager-lib/io/dfilecopymovejob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4517,6 +4517,11 @@ void DFileCopyMoveJob::run()
d->setState(RunningState);
}
}
else if (d->mode == CopyMode || d->mode == CutMode){
while (d->state != DFileCopyMoveJob::StoppedState && d->lastProgress < 1) {
QThread::msleep(100);
}
}
}

d->fileStatistics->stop();
Expand Down

0 comments on commit 64b01bc

Please sign in to comment.