allow "zypper ar /path/to/dir directory"
authorKlaus Kaempf <kkaempf@suse.de>
Sat, 25 Aug 2007 13:26:25 +0000 (13:26 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Sat, 25 Aug 2007 13:26:25 +0000 (13:26 +0000)
 as a shortcut of "zypper ar dir:/path/to/dir directory"

src/zypper.cc

index cac772f..6edc54c 100644 (file)
@@ -66,8 +66,9 @@ DigestCallbacks digest_callbacks;
  */
 Url make_url (const string & url_s) {
   Url u;
+
   try {
-    u = Url (url_s);
+    u = Url( (url_s[0] == '/') ? string("dir:") + url_s : url_s );
   }
   catch ( const Exception & excpt_r ) {
     ZYPP_CAUGHT( excpt_r );