Carpet padding with bi-fold closet doors?
I would take the little piece of pad out and place a scrap piece of 3/8" or 1/2" plywood in there if you have it. The pad will compress, the plywood will not. The doors are height adjustable, the bottom pivot in the door has threads that allow it to rise up or drop down. The original holes are not critical to keep. Place the bottom pivot guide onto the carpet and set the screw into the plywood through the carpet, the bracket may go at an angle, but press it down at the jamb end and set the screws into the jamb. Adjust the bottom pivot for height if needed.