Rename copy_file/2 to file_copy/2
This commit is contained in:
@@ -3533,12 +3533,12 @@ impl Machine {
|
||||
self.rename_file();
|
||||
step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
|
||||
}
|
||||
&Instruction::CallCopyFile(_) => {
|
||||
self.copy_file();
|
||||
&Instruction::CallFileCopy(_) => {
|
||||
self.file_copy();
|
||||
step_or_fail!(self, self.machine_st.p += 1);
|
||||
}
|
||||
&Instruction::ExecuteCopyFile(_) => {
|
||||
self.copy_file();
|
||||
&Instruction::ExecuteFileCopy(_) => {
|
||||
self.file_copy();
|
||||
step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
|
||||
}
|
||||
&Instruction::CallWorkingDirectory(_) => {
|
||||
|
||||
@@ -1654,7 +1654,7 @@ impl Machine {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub(crate) fn copy_file(&mut self) {
|
||||
pub(crate) fn file_copy(&mut self) {
|
||||
if let Some(file) = self.machine_st.value_to_str_like(self.machine_st.registers[1]) {
|
||||
if let Some(copied) = self.machine_st.value_to_str_like(self.machine_st.registers[2]) {
|
||||
if fs::copy(file.as_str(), copied.as_str()).is_ok() {
|
||||
|
||||
Reference in New Issue
Block a user