When the image of a convex set in $\mathbb{R}^n$ is still a convex set?

Here is tricky problem I came across when writing a paper. But I can't figure it out, so I ask for help here.

Let $$M$$ be a $$n$$-dimensional smooth manifold which is also a complete geodesic space. We can map a small ball around a point in $$M$$ to $$\mathbb{R}^n$$ endowed with the Euclidean metric such that the map is a homeomorphism.

The small ball is a convex set in $$M$$ (i.e the geodesic lines which connect any two points in the small ball are still in it). Can we find a homeomorphism such that the image of the small ball in $$\mathbb{R}^n$$ is also convex set?

• Geodesic convexity of small balls is well known, as is the fact that the exponential map takes small enough balls around the origin in the tangent space to convex balls in the manifold. Read any of the standard textbooks on Riemannian geometry, such as Chavel's book, and you should find these results. – Ben McKay May 27 '19 at 15:58
• @BenMcKay, if the metric comes from Riemannian metric, then it is right. If not, (for example, CAT(0) space), how to do it? – Jialong Deng May 27 '19 at 16:47

Sometimes it is not possible. Let me describe a metric on the 2-disk $$\mathbb{D}$$ that is Riemannian everywhere except the center of $$\mathbb{D}$$.
Make a sequence of holes in $$\mathbb{D}$$ that converge to the center. Attach a finger to each hole such that the length of fingers converge to zero, but it still much larger than the distance to the center. The construction could be made in such a way that in the obtained metric any small ball around the center has fingers that sticks out of it. In particular any such ball is not homeomorphic to the disk.