If the deposit has been made by a capacitated person with another who is not, the depositor shall only have an action to recover the thing deposited while it is still in the possession of the depositary, or to compel the latter to pay him the amount by which he may have enriched or benefited himself with the thing or its price. However, if a third person who acquired the thing acted in bad faith, the depositor may bring an action against him for its recovery. (1765a)