summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_3.data
diff options
context:
space:
mode:
authorŁukasz Matysiak <lukasz.matysiak@qt.io>2024-06-04 16:03:44 +0200
committerŁukasz Matysiak <lukasz.matysiak@qt.io>2024-06-16 23:56:59 +0200
commit8915ae3a75c4a356d94962dd9b31e1458f2a506f (patch)
treef4c9b9b0061ced281e9127b9cab565fa9dc18dca /tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_3.data
parentd2b4aec865bd834747cd824658e567b83bf081e6 (diff)
Make createDirectoryWithParents return true for existing dirs on read only fsHEADdev
When the filesystem is mounted in a read only mode, Linux returns true on an attempt to create a dir that already exists on that fs. However not every platform behaves that way. VxWorks is not a fully unix-like system. It is possible to enable a component that provides a virtual root file system (VRFS) so that devices and paths can be managed using "/" as a root. The root itself is not an actual path that can be used like on other systems. It is not possible to store files directly in "/". On Linux, mkdir on "/" returns EEXIST. On VxWorks, it returns EROFS (read only file system). That leads to a failing test (tst_QDir::makedirReturnCode). It also leads to a broken contract, since the doc for QDir::mkpath states that: `If the path already exists when this function is called, it will return true.` The doc for createDirectoryWithParents has no such comment and it is used by other functions that also do not promise such things, but the implementation behaves that way anyway: when errno == EEXIST -> return true if the target path is an existing directory. Since the existing unix implementation already returns true for existing dirs (without checking if it was called in the context of `mkpath` or any other function), fix the problem by checking if errno == EROFS after a call to mkdir and then checking if the target path already exists and is a directory Pick-to: 6.7 6.8 Task-number: QTBUG-115777 Change-Id: I849bca56618bf675933cccc5a9d5313e0014628b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Karim Pinter <karim.pinter@qt.io> Reviewed-by: Jarno Lämsä <jarno.lamsa@qt.io>
Diffstat (limited to 'tests/auto/qtextstream/resources/little_endian/qt3_operator_shift_short_resource_UnicodeNetworkOrder_3.data')
0 files changed, 0 insertions, 0 deletions