Bug 463291

Summary: Dolphin could occasionally call "sync" to avoid data corruption
Product: [Frameworks and Libraries] frameworks-kio Reporter: Filip Gawin <shfil>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: felixernst, kdelibs-bugs, kfm-devel
Priority: NOR    
Version: 5.101.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Filip Gawin 2022-12-20 23:44:45 UTC
Hi, I use a lot removable storage. Be it pendrive or ssd for Virtual Machine. I need to force myself to remember to call sync. 

I do wonder if it's possible for dolphin to handle itself. Adding some animation would make it clear.
Comment 1 Felix Ernst 2022-12-30 14:26:53 UTC
This should be done in KIO so I'll move this there. syncfs or fsync is what we need to use here IMO. I think the solution with the least disadvantages is calling "syncfs()" once on any removable data storage once a copy job is fully completed, and only then reporting the copy as finished. If that isn't enough, we might need to fsync every file once.