summaryrefslogtreecommitdiff
path: root/core/launcher/packageslave.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/packageslave.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/packageslave.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp
index a11ac86..0461432 100644
--- a/core/launcher/packageslave.cpp
+++ b/core/launcher/packageslave.cpp
@@ -154,50 +154,49 @@ void PackageHandler::addPackageFiles( const QString &location,
if ( f.open(IO_ReadOnly) ) {
QTextStream ts(&f);
QString s;
while ( !ts.eof() ) { // until end of file...
s = ts.readLine(); // line of text excluding '\n'
// for s, do link/mkdir.
if ( s.right(1) == "/" ) {
odebug << "do mkdir for " << s.ascii() << "" << oendl;
#ifndef Q_OS_WIN32
mkdir( s.ascii(), 0777 );
//possible optimization: symlink directories
//that don't exist already. -- Risky.
#else
d.mkdir( s.ascii());
#endif
} else {
#ifndef Q_OS_WIN32
odebug << "do symlink for " << s.ascii() << "" << oendl;
symlink( (location + s).ascii(), s.ascii() );
#else
odebug << "Copy file instead of a symlink for WIN32" << oendl;
if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE))
- qWarning("Unable to create symlinkfor %s",
- (location + s).ascii());
+ owarn << "Unable to create symlinkfor " << (location + s).ascii() << oendl;
#endif
}
}
f.close();
}
}
void PackageHandler::addPackages( const QString &location )
{
// get list of *.list in location/usr/lib/ipkg/info/*.list
QDir dir(location + "/usr/lib/ipkg/info", "*.list", // No tr
QDir::Name, QDir::Files);
if ( !dir.exists() )
return;
QStringList packages = dir.entryList();
for ( QStringList::Iterator it = packages.begin();
it != packages.end(); ++it ) {
addPackageFiles( location, *it );
}
}
void PackageHandler::cleanupPackageFiles( const QString &listfile )