Admin Console Publish a DB pre-populates the publish point erroneously #1921
Description
Description
In Admin Console publish option, the "publish point" is created by removing multiple copies of glbglm
Issue is when we have DBs named as: "cut1glm.glm", "cut2glm.glm", "cut3glm.glm", "cut4glb.glb", and you try to publish these, they are now populated as names like: "cut", "cut_copy", "cut_copy_2" and so on, while the name should have been "cut1glm", "cut2glm",..,"cut4glb" and such.
To Reproduce
Login to the admin console: Example: "http://myserver/admin/"
Publish any existing with a DB publish point name such as: "aglbbglbcglb1glm2glm3glm.glb".
Now try publishing this newly created DB, and observe that the publish point is now named something like "_copy" or such.
Expected behavior
Publish point should have been the entire content "aglbbglbcglb1glm2glm3glm", sans the final ".glb" or the final ".glm", if they exist. An addition of "_copy" is acceptable on DB name if the prior DB name was already taken.
Desktop
- Server OS: [RHEL 7.9, but issue should be independent of it]
- Client OS: [Windows 10, but issue is independent of tihs]
- Browser [Chrome, but independent of browser]
- Version [e.g. 5.3.7, but independent of version]
Additional context
Originally identified when creating cutter with DB names like: cut1glb.glb, cut2glb.glb, cut3glm.glm, cut4glm.glm and then later identified that the error is actually due to a possible replacement of "?glb" and "?glm" without actually validating that it is a ".glb" and ".glm" that occurs only at the end of the string.