summaryrefslogtreecommitdiff
path: root/lib/util/canonicalize_name.c
AgeCommit message (Collapse)Author
2019-07-24Enable largefile supportMatt Turner
Requires that config.h be included before other headers, since the macro _FILE_OFFSET_BITS changes the definitions of things like 'struct stat'. I chose to simply include it at the top of every C file and at immediately after the double-inclusion guards of every header. Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-06-20simplify and improve canonicalize_nameDavid Oberhollenzer
- Replace scan and memmove with simple automaton - Convert forward to back slashes, lots of file systems treat them equivalenty, this saves us a few more checks down the road - Remove './' path components. We can saveley remove them in a string processing step instead of throwing an error. Also they actually appear often in tar balls, possibly not under user control. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2019-05-02Add utility functionsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>