summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorMaximiliano Curia <maxy@debian.org>2014-09-16 18:56:16 +0200
committerMaximiliano Curia <maxy@debian.org>2014-09-16 18:56:16 +0200
commit852f9cc411ad184d1eb074ed20839d20e6a02f88 (patch)
tree7c5e433fe36fc671be5f5d482d15bf65ce1566ea /debian/patches
parent9c5429f4a1e90bcab243e562ad08c6469349cf45 (diff)
downloadkde4libs-852f9cc411ad184d1eb074ed20839d20e6a02f88.tar.gz
New upstream patch: upstream-copyjob.cpp.diff
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/upstream-copyjob.cpp.diff29
2 files changed, 30 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
index 55548a6..209bf0f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,3 +29,4 @@ disable_bogus_test.diff
disable_bogus_tests
fix_solidlex_destroy_signature.patch
skip_kmountpointtest_if_no_mtab
+upstream-copyjob.cpp.diff
diff --git a/debian/patches/upstream-copyjob.cpp.diff b/debian/patches/upstream-copyjob.cpp.diff
new file mode 100644
index 0000000..02564c2
--- /dev/null
+++ b/debian/patches/upstream-copyjob.cpp.diff
@@ -0,0 +1,29 @@
+diff --git a/kio/kio/copyjob.cpp b/kio/kio/copyjob.cpp
+index 713255b..ec1030c 100644
+--- a/kio/kio/copyjob.cpp
++++ b/kio/kio/copyjob.cpp
+@@ -340,15 +340,21 @@ void CopyJobPrivate::slotResultStating( KJob *job )
+ if ( destinationState == DEST_NOT_STATED ) {
+ if ( m_dest.isLocalFile() ) { //works for dirs as well
+ QString path = m_dest.toLocalFile();
+- if (m_asMethod) {
++ QFileInfo fileInfo(path);
++ if (m_asMethod || !fileInfo.exists()) {
+ // In copy-as mode, we want to check the directory to which we're
+ // copying. The target file or directory does not exist yet, which
+ // might confuse KDiskFreeSpaceInfo.
+- path = QFileInfo(path).absolutePath();
++ path = fileInfo.absolutePath();
+ }
+ KFileSystemType::Type fsType = KFileSystemType::fileSystemType( path );
+ if ( fsType != KFileSystemType::Nfs && fsType != KFileSystemType::Smb && fsType != KFileSystemType::Ramfs ) {
+- m_freeSpace = KDiskFreeSpaceInfo::freeSpaceInfo( path ).available();
++ KDiskFreeSpaceInfo freeSpaceInfo = KDiskFreeSpaceInfo::freeSpaceInfo(path);
++ if (freeSpaceInfo.isValid()) {
++ m_freeSpace = freeSpaceInfo.available();
++ } else {
++ kDebug() << "Couldn't determine free space information for" << path;
++ }
+ }
+ //TODO actually preliminary check is even more valuable for slow NFS/SMB mounts,
+ //but we need to find a way to report connection errors to user