Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/knewfilemenu.cpp
Show First 20 Lines • Show All 849 Lines • ▼ Show 20 Line(s) | 847 | if (!name.isEmpty()) { | |||
---|---|---|---|---|---|
850 | } else { | 850 | } else { | ||
851 | if (!m_viewShowsHiddenFiles && name.startsWith('.')) { | 851 | if (!m_viewShowsHiddenFiles && name.startsWith('.')) { | ||
852 | if (!writeHiddenDir) { | 852 | if (!writeHiddenDir) { | ||
853 | confirmCreatingHiddenDir(name); | 853 | confirmCreatingHiddenDir(name); | ||
854 | return; | 854 | return; | ||
855 | } | 855 | } | ||
856 | } | 856 | } | ||
857 | url = baseUrl; | 857 | url = baseUrl; | ||
858 | url.setPath(url.path() + '/' + name); | 858 | url.setPath(QDir::cleanPath(url.path() + '/' + name)); | ||
859 | } | 859 | } | ||
860 | } | 860 | } | ||
861 | 861 | | |||
862 | // Note that we use mkpath so that a/b/c works. | 862 | // Note that we use mkpath so that a/b/c works. | ||
863 | // On the other hand it means that passing the name of a directory that already exists will do nothing. | 863 | // On the other hand it means that passing the name of a directory that already exists will do nothing. | ||
864 | KIO::Job *job = KIO::mkpath(url, baseUrl); | 864 | KIO::Job *job = KIO::mkpath(url, baseUrl); | ||
865 | job->setProperty("mkpathUrl", url); | 865 | job->setProperty("mkpathUrl", url); | ||
866 | KJobWidgets::setWindow(job, m_parentWidget); | 866 | KJobWidgets::setWindow(job, m_parentWidget); | ||
▲ Show 20 Lines • Show All 400 Lines • Show Last 20 Lines |