Compare commits
2 commits
59461f38f6
...
92ac0d0384
| Author | SHA1 | Date | |
|---|---|---|---|
| 92ac0d0384 | |||
| 5f88c0f5ed |
3 changed files with 4 additions and 5 deletions
|
|
@ -44,9 +44,8 @@ pub fn create_static_output_files(source_dir: &str) {
|
|||
}
|
||||
}
|
||||
Err(err) => {
|
||||
if err.kind() == NotFound {
|
||||
} else {
|
||||
Err(err).unwrap()
|
||||
if err.kind() != NotFound {
|
||||
panic!("Unexpected error: {}", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ where
|
|||
{
|
||||
async fn run(&self, program: &str, args: &[&OsStr], input: &str) -> IoResult<Output> {
|
||||
let raw_new_args = [self.user_name, "-s", "/usr/bin/env", "--", program];
|
||||
let mut new_args: Vec<&OsStr> = raw_new_args.iter().map(|s| s.as_ref()).collect();
|
||||
let mut new_args: Vec<&OsStr> = raw_new_args.iter().map(AsRef::as_ref).collect();
|
||||
new_args.extend_from_slice(args);
|
||||
self.command_runner.run("su", &new_args, input).await
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ impl<N: AsRef<str>, C: CommandRunner, S: Storage> Symbol for Dump<'_, N, C, S> {
|
|||
let dump_date = self.storage.recent_date()?;
|
||||
let output = self.run_sql(&format!("select UNIX_TIMESTAMP(MAX(UPDATE_TIME)) from information_schema.tables WHERE table_schema = '{}'", self.db_name.as_ref())).await?;
|
||||
let modified_date = output.trim_end();
|
||||
Ok(modified_date != "NULL" && u64::from_str(modified_date)? <= dump_date)
|
||||
Ok(modified_date == "NULL" || u64::from_str(modified_date)? <= dump_date)
|
||||
}
|
||||
|
||||
async fn execute(&self) -> Result<(), Box<dyn Error>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue