Closed damianhxy closed 3 months ago
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Avoid turning files into dotfiles when preparing an assessment for MOSS, by prepending
MOSS
to all filenames after replacing slashes with hyphens.Note: an alternative might be to use
File.cleanpath
(docs). However, it can lead to name collisions since it would simply strip out any..
in the name.Motivation and Context
Closes #2094
How Has This Been Tested?
Extract Archive.zip. Contains four tar file submissions
tarnormal.tar
: files are tarred "normally", i.e.tar -cf tarnormal.tar autograde-Makefile dave.c hello.c
tarrelative.tar
: files are tarred using./
, i.e.tar -cf tarrelative.tar ./autograde-Makefile ./dave.c ./hello.c
tartraversal.tar
: files traverse one level up first, i.e.tar -cf tartraversal.tar ../MossTest/autograde-Makefile ../MossTest/dave.c ../MossTest/hello.c
tartraversal2.tar
: files traverse two levels up first, i.e.tar -cf tartraversal2.tar ../../Desktop/MossTest/autograde-Makefile ../../Desktop/MossTest/dave.c ../../Desktop/MossTest/hello.c
Submit the files one at a time -> after each submission, check that MOSS works for the assessment (i.e. select
isArchive
and send*hello.c
BEFORE
AFTER (possibly failed by exceeding request limit, nonetheless the error is different)
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting