[Interest] QFile/QDir: force move mode only?

Alexander Dyagilev alervdvcw at gmail.com
Mon May 13 11:31:25 CEST 2019


And yes, this is a really unwanted behavior and it was a short-sighted 
decision to make it behave so.

QFile::rename should rename always or fail! It should never do 
completely different operation - copy!


On 5/13/2019 12:26 PM, Alexander Dyagilev wrote:
>
> On 5/12/2019 12:22 AM, Henry Skoglund wrote:
>> QFile/QDir is pretty much at the mercy of the OS, i.e. if the OS 
>> refuses the renaming (for example on NTFS when you try to rename 
>> across volumes) then QFile dutifully copies the file instead.
>
> I know it. That's is what the question about. How to avoid this behavior.
>
>
>>
>> So I think this is not a Qt question 
>
> Definitely it's a Qt question. Qt could provide some flag to avoid 
> this unwanted behavior.
>
>


More information about the Interest mailing list