mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 00:22:36 +02:00
Okay let's just not have this broken locking at all right now.
I think I should just protect access to shared data structures and eventually do read/write atomicity locks at the inode level.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 18:36:47 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b1ff62f6057
@@ -56,15 +56,15 @@ auto SyntheticFileSystem::createDirectory(String&& name) -> OwnPtr<File>
|
||||
return file;
|
||||
}
|
||||
|
||||
auto SyntheticFileSystem::createTextFile(String&& name, String&& text) -> OwnPtr<File>
|
||||
auto SyntheticFileSystem::createTextFile(String&& name, ByteBuffer&& contents, Unix::mode_t mode) -> OwnPtr<File>
|
||||
{
|
||||
auto file = make<File>();
|
||||
file->data = text.toByteBuffer();
|
||||
file->data = contents;
|
||||
file->name = move(name);
|
||||
file->metadata.size = file->data.size();
|
||||
file->metadata.uid = 100;
|
||||
file->metadata.gid = 200;
|
||||
file->metadata.mode = 0010644;
|
||||
file->metadata.mode = mode;
|
||||
file->metadata.mtime = mepoch;
|
||||
return file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user