mirror of
https://github.com/upa/mscp.git
synced 2026-02-15 09:44:43 +08:00
add O_TRUNC when the first open() for a file
This commit is contained in:
@@ -37,7 +37,8 @@ struct file {
|
||||
* if the file state of the chunk is INIT:
|
||||
* acquire the file lock
|
||||
* * if file state is INIT:
|
||||
* create destination file and directory if necessary
|
||||
* create directory if necessary
|
||||
* open file with O_TRUNC and close.
|
||||
* set file state OPENED.
|
||||
* // only the first thread in the lock open the destination file
|
||||
* release the file lock
|
||||
|
||||
Reference in New Issue
Block a user