HexEdit/Explorer.cpp
DROPEFFECT CExplorerDropTarget::CanMoveFolder(LPCTSTR folder, LPCTSTR dst)
{
	DROPEFFECT retval = CanMove(folder, dst);
	if (retval != DROPEFFECT_NONE)
	{
		// Also make sure that we don't move a folder to itself or a descendant
		TCHAR common[MAX_PATH];
		size_t len = ::PathCommonPrefix(folder, dst, common);
		if (len == _tcslen(folder))
			retval = DROPEFFECT_NONE;
	}
	return retval;
}
// Check if move of a folder is allowed - checks that not moving to parent folder (ie,
// no move at all) and also that it is not moved inside itself (to itself or descendant).

Check if move of a folder is allowed - checks that not moving to parent folder  and also that it is not moved inside itself (to itself or descendant).
Check if move of a folder is allowed - checks that not moving to parent folder and also that it is not moved inside itself ( to itself or descendant ) .
DROPEFFECT CExplorerDropTarget::CanMoveFolder(LPCTSTR folder, LPCTSTR dst)
{
	DROPEFFECT retval = CanMove(folder, dst);
	if (retval != DROPEFFECT_NONE)
	{
		TCHAR common[MAX_PATH];
		size_t len = ::PathCommonPrefix(folder, dst, common);
		if (len == _tcslen(folder))
			retval = DROPEFFECT_NONE;
	}
	return retval;
}
DROPEFFECT CExplorerDropTarget :: CanMoveFolder ( LPCTSTR folder , LPCTSTR dst ) { DROPEFFECT retval = CanMove ( folder , dst ) ; if ( retval != DROPEFFECT_NONE ) { TCHAR common [ MAX_PATH ] ; size_t len = :: PathCommonPrefix ( folder , dst , common ) ; if ( len == _tcslen ( folder ) ) retval = DROPEFFECT_NONE ; } return retval ; }
Check if move of a folder is allowed - checks that not moving to parent folder (ie,
no move at all) and also that it is not moved inside itself (to itself or descendant).
Check if move of a folder is allowed - checks that not moving to parent folder ( ie no move at all ) and also that it is not moved inside itself ( to itself or descendant ) .
// Also make sure that we don't move a folder to itself or a descendant
