Skip to content

Commit

Permalink
Compliance to Arduino build CI workflow pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Apr 10, 2024
1 parent 8218f84 commit 638750b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rishka_syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ bool RishkaSyscall::Sys::changeDir(RishkaVM* vm) {
return true;
}

String target = rishka_sanitize_path(vm->getWorkingDirectory(), String(dir));
String target = rishka_sanitize_path(vm->getWorkingDirectory(), dir);
if(!SD.exists(target))
return false;

Expand Down
4 changes: 2 additions & 2 deletions src/rishka_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,8 +1011,8 @@ uint64_t RishkaVM::handleSyscall(uint64_t code) {
return 0;
}

void RishkaVM::setWorkingDirectory(char* directory) {
this->workingDirectory = directory;
void RishkaVM::setWorkingDirectory(String directory) {
this->workingDirectory = directory.c_str();
}

char* RishkaVM::getWorkingDirectory() {
Expand Down
2 changes: 1 addition & 1 deletion src/rishka_vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class RishkaVM final {
*
* @param directory The path to the new working directory.
*/
void setWorkingDirectory(char* directory);
void setWorkingDirectory(String directory);

/**
* @brief Retrieves the current working directory of the virtual machine.
Expand Down

0 comments on commit 638750b

Please sign in to comment.