From 5f35158ba0e7c2813768aaab6d6ad478dc0271a1 Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 20 Dec 2004 21:58:55 +0000 Subject: Restore lost change -Kill Config instance in different scope for the same file -Work when a ftp client sends -la in a listdir request --- (limited to 'core/launcher') 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 @@ -232,7 +232,6 @@ bool SyncAuthentication::checkPassword( const QString& password ) * 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) { @@ -380,8 +379,10 @@ 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; @@ -697,6 +698,9 @@ void ServerPI::process( const QString& message ) // list (LIST) else if ( cmd == "LIST" ) { + if ( args == "-la" ) + args = QString::null; + if ( sendList( absFilePath( args ) ) ) send( "150 File status okay" ); // No tr else -- cgit v0.9.0.2