Fix unintended rename of Pskfile

pull/1/head
Slávek Banko 12 years ago
parent f9af3e67d7
commit 5f69e1948f

@ -5145,16 +5145,16 @@ void KVpnc::connectClicked()
if ( GlobalConfig->currentProfile->getAuthType() == VpnAccountData::psk ) if ( GlobalConfig->currentProfile->getAuthType() == VpnAccountData::psk )
{ {
// write psk.<profile>.key // write psk.<profile>.key
TQFile Pstdefile ( tmpPath + "psk." + ProfileName + ".key" ); TQFile Pskfile ( tmpPath + "psk." + ProfileName + ".key" );
stream.setDevice ( &Pstdefile ); stream.setDevice ( &Pskfile );
if ( Pstdefile.open ( IO_WriteOnly ) ) if ( Pskfile.open ( IO_WriteOnly ) )
{ {
stream << GlobalConfig->currentProfile->getPreSharedKey() << "\n"; stream << GlobalConfig->currentProfile->getPreSharedKey() << "\n";
Pstdefile.close(); Pskfile.close();
} }
else else
{ {
GlobalConfig->appendLogEntry ( i18n ( "%1 could not opened. Stop." ).arg ( Pstdefile.name() ),GlobalConfig->error ); GlobalConfig->appendLogEntry ( i18n ( "%1 could not opened. Stop." ).arg ( Pskfile.name() ),GlobalConfig->error );
} }
stream.unsetDevice(); stream.unsetDevice();

Loading…
Cancel
Save