Skip to content

Commit a3a6181

Browse files
authored
Merge pull request #90 from rage/refresh-fix-3
Refresh fix 3
2 parents f7cb079 + 25c877a commit a3a6181

File tree

8 files changed

+212
-85
lines changed

8 files changed

+212
-85
lines changed

tmc-langs-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tmc-langs-cli"
3-
version = "0.10.0"
3+
version = "0.10.1"
44
authors = ["University of Helsinki <[email protected]>", "Daniel Martinez <[email protected]>"]
55
edition = "2018"
66
description = "CLI client for TMC"

tmc-langs-cli/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,8 +1558,6 @@ fn run_settings(
15581558
let dir = matches.value_of("dir").unwrap();
15591559
let target = PathBuf::from(dir);
15601560

1561-
file_util::lock!(&target);
1562-
15631561
if target.is_file() {
15641562
anyhow::bail!("The target path points to a file.")
15651563
}

tmc-langs-util/src/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ pub enum UtilError {
3232
#[error("Error while writing file to zip")]
3333
ZipWrite(#[source] std::io::Error),
3434

35+
#[error("Cache path {0} was invalid. Not a valid UTF-8 string or did not contain a cache version after a dash")]
36+
InvalidCachePath(PathBuf),
3537
#[error("Path {0} contained a dash '-' which is currently not allowed")]
3638
InvalidDirectory(PathBuf),
3739

@@ -43,6 +45,8 @@ pub enum UtilError {
4345
Zip(#[from] zip::result::ZipError),
4446
#[error(transparent)]
4547
FileIo(#[from] FileIo),
48+
#[error(transparent)]
49+
Yaml(#[from] serde_yaml::Error),
4650

4751
#[cfg(unix)]
4852
#[error("Error changing permissions of {0}")]

tmc-langs-util/src/task_executor.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,18 @@ pub fn clean(path: &Path) -> Result<(), UtilError> {
207207

208208
/// Recursively searches for valid exercise directories in the path.
209209
pub fn find_exercise_directories(exercise_path: &Path) -> Result<Vec<PathBuf>, UtilError> {
210+
log::info!(
211+
"finding exercise directories in {}",
212+
exercise_path.display()
213+
);
214+
210215
let mut paths = vec![];
211216
for entry in WalkDir::new(exercise_path).into_iter().filter_entry(|e| {
212217
!submission_processing::is_hidden_dir(e)
213218
&& e.file_name() != "private"
214219
&& !submission_processing::contains_tmcignore(e)
215220
}) {
216221
let entry = entry?;
217-
// TODO: Java implementation doesn't scan root directories
218222
if is_exercise_root_directory(entry.path()) {
219223
paths.push(entry.into_path())
220224
}

0 commit comments

Comments
 (0)