Prefix path trimming