diff options
Diffstat (limited to 'krename/krenameimpl.cpp')
-rw-r--r-- | krename/krenameimpl.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/krename/krenameimpl.cpp b/krename/krenameimpl.cpp index 1835fd1..e62c81c 100644 --- a/krename/krenameimpl.cpp +++ b/krename/krenameimpl.cpp @@ -1171,14 +1171,18 @@ bool KRenameImpl::setupBatchRenamer( BatchRenamer* b, bool preview ) int i = 0; TQString d = "/"; - while (!(d += url.section( "/", i, i, TQString::SectionSkipEmpty)).isEmpty()) { // asignment here! - if (!TDEIO::NetAccess::exists(d, false, parent) && !TDEIO::NetAccess::mkdir(d, parent, -1)) + TQString ds = TQString::null; + for (ds = url.section("/", i, i, TQString::SectionSkipEmpty); + !ds.isEmpty(); + i++, d.append("/"), ds = url.section("/", i, i, TQString::SectionSkipEmpty)) + { + d += ds; + if (!TDEIO::NetAccess::exists(d, false, parent) && + !TDEIO::NetAccess::mkdir(d, parent, -1)) { tqDebug( "Can't create %s", d.latin1() ); break; } - d.append( "/" ); - i++; } } |