summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-12-27 17:33:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-12-27 17:33:48 -0600
commita179d5d6967c204d5973fff2839a517175671b5b (patch)
tree2f5b02e822a24c2bf659729f494c74f9cb2bcecb /tdecore/tdehw
parent80a04dbf8a7f10fd9d78fdf85374fcf1d4ab93e9 (diff)
downloadtdelibs-a179d5d6967c204d5973fff2839a517175671b5b.tar.gz
tdelibs-a179d5d6967c204d5973fff2839a517175671b5b.zip
Fix crash in mount/umount operations when using pmount
Remove unneeded hack in dirlister for media device root directory
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp15
1 files changed, 9 insertions, 6 deletions
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