Skip to content

Commit

Permalink
Fix O_CREAT flag in open syscall (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
raccog authored Dec 22, 2023
1 parent bb2988e commit bf63ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/syscall/systemio.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class SystemIO : public QObject {
auto &file = files[fd];
file.open(qtOpenFlags);

if (!file.exists() && flags & O_CREAT) {
if (!file.exists() && !(flags & O_CREAT)) {
throw std::runtime_error("Could not create file");
}

Expand Down

0 comments on commit bf63ddc

Please sign in to comment.