Qt fails to copy file on ubuntu.
-
@Qingshui-Kong
Yes and no! The question you are asking about the behaviour of a mounted USB drive, and seeming to need to either unmount orsync
/fsync()
, is actually a nasty area! I too would not be sure of behaviour, so it's very understandable that you are unsure :)@JonB
OK. Thank you! I use sync to solve the problem. -
@JonB
OK. Thank you! I use sync to solve the problem.@Qingshui-Kong
Yes, that seems OK. It forces the OS to flush the pending content to the USB file, without which your problem seems to occur, so it is understandable.Running
sync
on its own asks the OS to flush all file systems, which technically you do not need. If you wish to improve on this, from a terminal runman sync
to read its syntax. There you can see that if you specify the individual USB file path as an argument it will only sync/flush that file system, which is all you need. -
@Qingshui-Kong
Yes, that seems OK. It forces the OS to flush the pending content to the USB file, without which your problem seems to occur, so it is understandable.Running
sync
on its own asks the OS to flush all file systems, which technically you do not need. If you wish to improve on this, from a terminal runman sync
to read its syntax. There you can see that if you specify the individual USB file path as an argument it will only sync/flush that file system, which is all you need.@JonB OK. Thank you very much!