release 0.6.6
[fapman] / repository.cpp
index 31eb71e..e688188 100644 (file)
@@ -35,7 +35,9 @@ QString Repository::toString()
        else
                str = "#deb ";
 
-       str += iUrl + iDir + " " + iDist + " " + iComponents;
+       str += iUrl + iDir + " " + iDist;
+       if( !iComponents.isEmpty() )
+               str += " " + iComponents;
 
        return( str.trimmed() );
 }
@@ -164,6 +166,9 @@ void Repository::set(QString name, QString url, QString dir, QString dist, QStri
        iComponents = components.trimmed();
        iEnabled = enabled;
 
+       if( iDist.isEmpty() )
+               iDist = ".";
+
        // ensure that the protocol part of the URL is lowercase
        int pos = iUrl.indexOf("://");
        QString proto = iUrl.left(pos);