I am getting a Segmentation fault but I do not know why:
// Assemble folderPositionString
char *folderPositionString = "folders-";
strcat (folderPositionString, "files");
In theory this should produce a single char string with 'folders-files' as the value. I have used strcat before and it works, but for some reason it is not happy here.
If I comment out the strcat line, everything compiles and works.
Working Code thanks to Eugene
char folderPositionString [50] = "folders.";
strcat (folderPositionString, folderPositionRaw);
strcat (folderPositionString, ".files");