dfaure added a comment.
What might be easier is: - if the user entered something without '/', use KIO::mkdir() (which will fail with ERR_DIR_ALREADY_EXIST if the dir already exists) - if the user entered something with '/', use KIO::mkpath() as the code currently does. Much simpler and faster than an (async and racy) existence check before hand. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D17617 To: ngraham, #dolphin, elvisangelaccio Cc: dfaure, emateli, elvisangelaccio, Codezela, kde-frameworks-devel, michaelh, ngraham, bruns