Skip to content

shorten-filenames.sh might lengthen rather than shorten path length #2

@Aikhjarto

Description

@Aikhjarto

shasum will always produce a 40 digit hash value. If a file/folder name which is shorter than 40 digits is encoded , it actually gets longer than shorter. Steps to reproduce:

mkdir -p abcdefghij/abcdefghij/abcdefghij
shorten-filenames.sh . encode 25

This results in ./abcdefghij/abcdefghij/b92ab2ae522e8b2a922b9c9b2c4fa7f677373489 which is actually longer than the original folder ./abcdefghij/abcdefghij/abcdefghij

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions