[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kfile
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2010-09-13 0:10:20
Message-ID: 20100913001020.74FFBAC887 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1174616 by adawit:
- Allow the creation of files/directories that start with "~".
BUG:117473
M +9 -2 knewfilemenu.cpp
--- trunk/KDE/kdelibs/kfile/knewfilemenu.cpp #1174615:1174616
@@ -723,9 +723,16 @@
QString name = m_text;
if (!name.isEmpty()) {
- if ((name[0] == '/') || (name[0] == '~')) {
+ // Expand any tilde mark that might have been specified...
+ const QString expandedName = KShell::tildeExpand(name);
+
+ // When a tilde mark cannot be properly expanded, the above call returns
+ // an empty string ; so we handle that scenario here...
+ if (!expandedName.isEmpty())
+ name = expandedName;
+
+ if ((name[0] == '/'))
url.setPath(KShell::tildeExpand(name));
- }
else {
if (!m_viewShowsHiddenFiles && name.startsWith('.')) {
if (!writeHiddenDir) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic