You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add the repo path to the struct Repo contained in the struct Data. In this way we can easily validate that the path is not under repos/archive in the check added in validate archived repos #1527
edit the load function and check that all entries of the archive directory aren't files.
I prefer option 1 because it's cleaner and doesn't complicate the "load" method. What do you think?
Unfortunately we can't edit the closure that we pass to load_dir because it only runs on repos under the subdirectories of archive, e.g. repos/archive/rust-lang.
The text was updated successfully, but these errors were encountered:
I was hoping that we could just modify the existing validations, but I see that they work on Data, which doesn't know about the filesystem anymore. I don't like option 1), because it would introduce an external information (filesystem path) into the Data world, which otherwise doesn't deal with the filesystem.
But I also don't think that we need to modify the load closure. Instead, we could just return an error here.
Discussed in #1527 (comment)
I think there are two ways of doing this:
archive
directory aren't files.I prefer option 1 because it's cleaner and doesn't complicate the "load" method. What do you think?
Unfortunately we can't edit the closure that we pass to
load_dir
because it only runs on repos under the subdirectories ofarchive
, e.g.repos/archive/rust-lang
.The text was updated successfully, but these errors were encountered: