Unset LANG in SCP; provides timestamps for files

This commit is contained in:
ChristianVisintin 2020-12-05 19:47:07 +01:00
parent a0b8af8bf1
commit 73fe2649be
2 changed files with 3 additions and 2 deletions

View file

@ -76,7 +76,8 @@ The developer documentation can be found on Rust Docs at <https://docs.rs/termsc
## Known issues
- Time in explorer is `1 Jan 1970`, but shouldn't be: that's because chrono can't parse date in a different locale. So if your server has a locale different from the one on your machine, it won't be able to parse the date.
- Ftp:
- Time in explorer is `1 Jan 1970`, but shouldn't be: that's because chrono can't parse date in a different locale. So if your server has a locale different from the one on your machine, it won't be able to parse the date.
---

View file

@ -467,7 +467,7 @@ impl FileTransfer for ScpFileTransfer {
let p: PathBuf = self.wrkdir.clone();
match self.perform_shell_cmd_with_path(
p.as_path(),
format!("ls -l \"{}\"", path.display()).as_str(),
format!("unset LANG; ls -l \"{}\"", path.display()).as_str(),
) {
Ok(output) => {
// Split output by (\r)\n