So, let's start with the Unix version. [This code](https://searchfox.org/mozilla-central/source/toolkit/components/osfile/modules/osfile_unix_front.jsm#730-733) is the fallback. It is used to ensure that we copy & remove in case the move failed. For this version, we just need to make sure that we *always* use that fallback code if there was an error with the main code, not just in case of `EXDEV`. For the Windows version, there's no fallback yet. We need to detect whether [this call](https://searchfox.org/mozilla-central/source/toolkit/components/osfile/modules/osfile_win_front.jsm#677-681) succeeded. If it failed, call `File.copy` and `File.move`.
Bug 1555644 Comment 19 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
So, let's start with the Unix version. [This code](https://searchfox.org/mozilla-central/source/toolkit/components/osfile/modules/osfile_unix_front.jsm#730-733) is the fallback. It is used to ensure that we copy & remove in case the move failed. For this version, we just need to make sure that we *always* use that fallback code if there was an error with the main code, not just in case of `EXDEV`. For the Windows version, there's no fallback yet. We need to detect whether [this call](https://searchfox.org/mozilla-central/source/toolkit/components/osfile/modules/osfile_win_front.jsm#677-681) succeeded. If it failed, call `File.copy` and `File.remove`.