From 7e561ecac5c3b7ad77d5d3adf6e96578fa417e79 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 2 May 2006 15:55:55 +0000 Subject: [PATCH] - Disabled isUseableAttachPoint check -- we do not mount here anything, so it is OK to use any dir (171351). --- zypp/media/MediaDIR.cc | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/zypp/media/MediaDIR.cc b/zypp/media/MediaDIR.cc index 7ef1588..4e8c466 100644 --- a/zypp/media/MediaDIR.cc +++ b/zypp/media/MediaDIR.cc @@ -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" )); } -- 2.7.4