[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/network/ktorrent/libbtcore
From: Joris Guisson <joris.guisson () gmail ! com>
Date: 2008-12-15 17:12:31
Message-ID: 1229361151.652767.9651.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 897296 by guisson:
Make sure that moving files to new dnd file structure is silently done in the \
background
M +2 -2 diskio/multifilecache.cpp
M +2 -2 util/fileops.cpp
M +2 -1 util/fileops.h
--- trunk/extragear/network/ktorrent/libbtcore/diskio/multifilecache.cpp \
#897295:897296 @@ -189,7 +189,7 @@
{
// old style dnd dir, move the file so that we can keep working
// with the old file
- bt::Move(dnd_dir + tf.getUserModifiedPath() + ".dnd",dnd_file,true);
+ bt::Move(dnd_dir + tf.getUserModifiedPath() + ".dnd",dnd_file,true,true);
}
dfd = new DNDFile(dnd_file,&tf,tor.getChunkSize());
dfd->checkIntegrity();
@@ -713,7 +713,7 @@
{
// old style dnd dir, move the file so that we can keep working
// with the old file
- bt::Move(dnd_dir + tf->getUserModifiedPath() + ".dnd",dnd_file,true);
+ bt::Move(dnd_dir + tf->getUserModifiedPath() + ".dnd",dnd_file,true,true);
return;
}
--- trunk/extragear/network/ktorrent/libbtcore/util/fileops.cpp #897295:897296
@@ -133,10 +133,10 @@
}
}
- void Move(const QString & src,const QString & dst,bool nothrow)
+ void Move(const QString & src,const QString & dst,bool nothrow,bool silent)
{
// Out() << "Moving " << src << " -> " << dst << endl;
- KIO::CopyJob *mv = KIO::move(KUrl(src),KUrl(dst));
+ KIO::CopyJob *mv = KIO::move(KUrl(src),KUrl(dst),silent ? \
KIO::HideProgressInfo|KIO::Overwrite : KIO::DefaultFlags); if \
(!KIO::NetAccess::synchronousRun(mv , 0)) {
if (!nothrow)
--- trunk/extragear/network/ktorrent/libbtcore/util/fileops.h #897295:897296
@@ -58,8 +58,9 @@
* @param src The source file
* @param dst The destination file / directory
* @param nothrow whether or not we shouldn't throw an Error upon failure
+ * @param silent Wehter or not to hide progress info
*/
- BTCORE_EXPORT void Move(const QString & src,const QString & dst,bool nothrow = \
false); + BTCORE_EXPORT void Move(const QString & src,const QString & dst,bool \
nothrow = false,bool silent = false);
/**
* Copy a file.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic