summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/transferserver.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index 1d4ca40..2b2e435 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -229,13 +229,12 @@ bool SyncAuthentication::checkPassword( const QString& password )
++lock;
/*
* we need to support old Sync software and QtopiaDesktop
*/
if ( password.left(6) == "Qtopia" || password.left(6) == "rootme" ) {
- Config cfg( "Security" );
cfg.setGroup("Sync");
QStringList pwds = cfg.readListEntry("Passwords",' ');
for (QStringList::ConstIterator it=pwds.begin(); it!=pwds.end(); ++it) {
#ifndef Q_OS_WIN32
QString cpassword = QString::fromLocal8Bit(
crypt( password.mid(8).local8Bit(), (*it).left(2).latin1() ) );
@@ -378,13 +377,15 @@ void ServerPI::read()
}
bool ServerPI::checkReadFile( const QString& file )
{
QString filename;
- if ( file[0] != "/" )
+ if ( file.length() == 1 && file[0] == "/" )
+ filename = file;
+ else if ( file[0] != "/" )
filename = directory.path() + "/" + file;
else
filename = file;
QFileInfo fi( filename );
return ( fi.exists() && fi.isReadable() );
@@ -694,12 +695,15 @@ void ServerPI::process( const QString& message )
else if ( cmd == "PWD" ) {
send( "257 \"" + directory.path() +"\"" );
}
// list (LIST)
else if ( cmd == "LIST" ) {
+ if ( args == "-la" )
+ args = QString::null;
+
if ( sendList( absFilePath( args ) ) )
send( "150 File status okay" ); // No tr
else
send( "500 Syntax error, command unrecognized" ); // No tr
}