From 4fe1e71d5b1bc121c67dd5a99faa4600a6a4a64a Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Mon, 5 Jun 2017 14:18:13 +0300 Subject: [PATCH] Issue #148 - add debug message for the case --- libgrive/src/base/State.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libgrive/src/base/State.cc b/libgrive/src/base/State.cc index 6d86a92..6cbf984 100644 --- a/libgrive/src/base/State.cc +++ b/libgrive/src/base/State.cc @@ -235,6 +235,12 @@ bool State::Update( const Entry& e ) } else if ( Resource *parent = m_res.FindByHref( e.ParentHref() ) ) { + if ( !parent->IsFolder() ) + { + // https://github.com/vitalif/grive2/issues/148 + Log( "%1% is owned by something that's not a directory: href=%2% name=%3%", e.Name(), e.ParentHref(), parent->RelPath(), log::error ); + return true; + } assert( parent->IsFolder() ) ; std::string path = parent->IsRoot() ? e.Name() : ( parent->RelPath() / e.Name() ).string();