Remove symbols from file name chars because it makes links look like shit

This commit is contained in:
hgw 2023-12-13 13:47:04 +00:00
parent 345236b2d9
commit d84826ae66
Signed by: hgw
SSH Key Fingerprint: SHA256:diG7RVYHjd3aDYkZWHYcBJbImu+6zfptuUP+3k/wol4

View File

@ -97,7 +97,7 @@ func Zeros(path string, size int64) error {
} }
func NameGen(fileNameLength int) string { func NameGen(fileNameLength int) string {
const chars = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789-_" const chars = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789"
ll := len(chars) ll := len(chars)
b := make([]byte, fileNameLength) b := make([]byte, fileNameLength)
rand.Read(b) // generates len(b) random bytes rand.Read(b) // generates len(b) random bytes