From a179d5d6967c204d5973fff2839a517175671b5b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 27 Dec 2013 17:33:48 -0600 Subject: Fix crash in mount/umount operations when using pmount Remove unneeded hack in dirlister for media device root directory --- tdecore/tdehw/tdestoragedevice.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tdecore') diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp index 9a3897133..36712cb1e 100644 --- a/tdecore/tdehw/tdestoragedevice.cpp +++ b/tdecore/tdehw/tdestoragedevice.cpp @@ -956,8 +956,9 @@ TQString TDEStorageDevice::mountDevice(TQString mediaName, TDEStorageMountOption FILE *exepipe = popen(command.local8Bit(), "r"); if (exepipe) { TQString mount_output; - TQTextStream ts(exepipe, IO_ReadOnly); - mount_output = ts.read(); + TQTextStream* ts = new TQTextStream(exepipe, IO_ReadOnly); + mount_output = ts->read(); + delete ts; *retcode = pclose(exepipe); if (errRet) { *errRet = mount_output; @@ -1030,8 +1031,9 @@ TQString TDEStorageDevice::mountEncryptedDevice(TQString passphrase, TQString me FILE *exepipe = popen(command.local8Bit(), "r"); if (exepipe) { TQString mount_output; - TQTextStream ts(exepipe, IO_ReadOnly); - mount_output = ts.read(); + TQTextStream* ts = new TQTextStream(exepipe, IO_ReadOnly); + mount_output = ts->read(); + delete ts; *retcode = pclose(exepipe); if (errRet) { *errRet = mount_output; @@ -1132,8 +1134,9 @@ bool TDEStorageDevice::unmountDevice(TQString* errRet, int* retcode) { FILE *exepipe = popen(command.local8Bit(), "r"); if (exepipe) { TQString umount_output; - TQTextStream ts(exepipe, IO_ReadOnly); - umount_output = ts.read(); + TQTextStream* ts = new TQTextStream(exepipe, IO_ReadOnly); + umount_output = ts->read(); + delete ts; *retcode = pclose(exepipe); if (*retcode == 0) { // Update internal mount data -- cgit v1.2.1