MCPcopy Create free account
hub / github.com/F-Stack/f-stack / UTIL_createMirroredDestDirName

Function UTIL_createMirroredDestDirName

freebsd/contrib/zstd/programs/util.c:810–820  ·  view source on GitHub ↗

this function will return NULL if input srcFileName is not valid name for mirrored output path */

Source from the content-addressed store, hash-verified

808
809/* this function will return NULL if input srcFileName is not valid name for mirrored output path */
810char* UTIL_createMirroredDestDirName(const char* srcFileName, const char* outDirRootName)
811{
812 char* pathname = NULL;
813 if (!isFileNameValidForMirroredOutput(srcFileName))
814 return NULL;
815
816 pathname = mallocAndJoin2Dir(outDirRootName, trimPath(srcFileName));
817
818 convertPathnameToDirName(pathname);
819 return pathname;
820}
821
822static int
823mirrorSrcDir(char* srcDirName, const char* outDirName)

Callers 2

Calls 4

mallocAndJoin2DirFunction · 0.85
trimPathFunction · 0.85
convertPathnameToDirNameFunction · 0.85

Tested by

no test coverage detected