summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/dir_access.cpp6
-rw-r--r--core/os/os.h2
-rw-r--r--core/os/rw_lock.h6
3 files changed, 5 insertions, 9 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index 330a9153ef..e631d6e994 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -98,22 +98,18 @@ static Error _erase_recursive(DirAccess *da) {
err = _erase_recursive(da);
if (err) {
- print_line("err recurso " + E->get());
da->change_dir("..");
return err;
}
err = da->change_dir("..");
if (err) {
- print_line("no go back " + E->get());
return err;
}
err = da->remove(da->get_current_dir().plus_file(E->get()));
if (err) {
- print_line("no remove dir" + E->get());
return err;
}
} else {
- print_line("no change to " + E->get());
return err;
}
}
@@ -122,8 +118,6 @@ static Error _erase_recursive(DirAccess *da) {
Error err = da->remove(da->get_current_dir().plus_file(E->get()));
if (err) {
-
- print_line("no remove file" + E->get());
return err;
}
}
diff --git a/core/os/os.h b/core/os/os.h
index dd783408e8..12c0222ad4 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -254,7 +254,7 @@ public:
virtual String get_executable_path() const;
virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false) = 0;
- virtual Error kill(const ProcessID &p_pid) = 0;
+ virtual Error kill(const ProcessID &p_pid, const int p_max_wait_msec = -1) = 0;
virtual int get_process_id() const;
virtual Error shell_open(String p_uri);
diff --git a/core/os/rw_lock.h b/core/os/rw_lock.h
index 9053794c83..3e53300c9f 100644
--- a/core/os/rw_lock.h
+++ b/core/os/rw_lock.h
@@ -56,8 +56,10 @@ class RWLockRead {
RWLock *lock;
public:
- RWLockRead(RWLock *p_lock) {
- lock = p_lock;
+ RWLockRead(const RWLock *p_lock) {
+ if (p_lock) {
+ lock = const_cast<RWLock *>(p_lock);
+ }
if (lock) lock->read_lock();
}
~RWLockRead() {