- Disabled isUseableAttachPoint check -- we do not mount
authorMarius Tomaschewski <mt@suse.de>
Tue, 2 May 2006 15:55:55 +0000 (15:55 +0000)
committerMarius Tomaschewski <mt@suse.de>
Tue, 2 May 2006 15:55:55 +0000 (15:55 +0000)
  here anything, so it is OK to use any dir (171351).

zypp/media/MediaDIR.cc

index 7ef1588..4e8c466 100644 (file)
@@ -67,24 +67,11 @@ namespace zypp {
       if(next)
        ZYPP_THROW(MediaNotSupportedException(url()));
 
-      //
-      // see ctor - attach point is equal source path
-      //
-      // don't allow to specify the attachpoint of an
-      // another media handler as source path, e.g.:
-      //   open("cd:///", "/mnt") && attach()
-      //   open("dir:/mnt", "")   && attach()
-      //
-      // still allows to use hand mounted media paths.
-      //
-      if( attachPoint().asString() != "/"
-         && attachPoint().asString() != "./"
-         && attachPoint().asString() != "../"
-         && attachPoint().asString() != ""
-         && !isUseableAttachPoint(attachPoint(), false))
+      // attach point is same as source path... we do not mount here
+      if(attachPoint().empty() || !PathInfo(attachPoint()).isDir())
       {
-       ZYPP_THROW(MediaBadUrlException(url(),
-         "Specified path '" + attachPoint().asString() + "' is not allowed as media source"
+        ZYPP_THROW(MediaBadUrlException(url(),
+          "Specified path '" + attachPoint().asString() + "' is not allowed as media source"
        ));
       }