Fix unintended rename of Pskfile

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

@ -5145,16 +5145,16 @@ void KVpnc::connectClicked()
if ( GlobalConfig->currentProfile->getAuthType() == VpnAccountData::psk )
{
// write psk.<profile>.key
TQFile Pstdefile ( tmpPath + "psk." + ProfileName + ".key" );
stream.setDevice ( &Pstdefile );
if ( Pstdefile.open ( IO_WriteOnly ) )
TQFile Pskfile ( tmpPath + "psk." + ProfileName + ".key" );
stream.setDevice ( &Pskfile );
if ( Pskfile.open ( IO_WriteOnly ) )
{
stream << GlobalConfig->currentProfile->getPreSharedKey() << "\n";
Pstdefile.close();
Pskfile.close();
}
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();

Loading…
Cancel
Save