You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by rd...@apache.org on 2022/12/09 16:18:31 UTC
[incubator-teaclave-sgx-sdk] branch v2.0.0-preview updated: Fix sgx_tprotected_fs rename
This is an automated email from the ASF dual-hosted git repository.
rduan pushed a commit to branch v2.0.0-preview
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git
The following commit(s) were added to refs/heads/v2.0.0-preview by this push:
new 43105575 Fix sgx_tprotected_fs rename
43105575 is described below
commit 431055754daca647e19df2b778079030ebaa8569
Author: sunhe05 <su...@baidu.com>
AuthorDate: Fri Dec 9 04:36:13 2022 +0000
Fix sgx_tprotected_fs rename
---
sgx_protected_fs/tfs/src/sys/file/other.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sgx_protected_fs/tfs/src/sys/file/other.rs b/sgx_protected_fs/tfs/src/sys/file/other.rs
index 6d14ab89..2e2fa918 100644
--- a/sgx_protected_fs/tfs/src/sys/file/other.rs
+++ b/sgx_protected_fs/tfs/src/sys/file/other.rs
@@ -179,7 +179,7 @@ impl FileInner {
ensure!(old_len > 0, eos!(EINVAL));
ensure!(old_len < FILENAME_MAX_LEN - 1, eos!(ENAMETOOLONG));
- let new_len = old_name.len();
+ let new_len = new_name.len();
ensure!(new_len > 0, eos!(EINVAL));
ensure!(new_len < FILENAME_MAX_LEN - 1, eos!(ENAMETOOLONG));
@@ -189,6 +189,7 @@ impl FileInner {
self.metadata.encrypted_plain.file_name.fill(0);
self.metadata.encrypted_plain.file_name[0..new_len].copy_from_slice(new_name.as_bytes());
+ self.need_writing = true;
Ok(())
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org