diff --git a/p-filesystem.cc b/p-filesystem.cc index 0f6e835..9751e00 100644 --- a/p-filesystem.cc +++ b/p-filesystem.cc @@ -312,7 +312,7 @@ T_FSPath T_FSPath::makeRelative( T_FSPath np; const T_String parent{ T_String::Pooled( ".." ) }; - for ( auto i = nca ; i > nCommon ; i -- ) { + for ( auto i = ncb ; i > nCommon ; i -- ) { np.components_.add( parent ); } for ( auto i = nCommon ; i < nca ; i ++ ) { @@ -335,7 +335,7 @@ bool T_FSPath::isCanonical( ) const noexcept return false; } } - return nc > 0; + return true; } T_FSPath T_FSPath::canonical( ) const noexcept