1. Antoine Pitrou
  2. pathlib

Commits

Antoine Pitrou  committed bf75f7c

Make touch() POSIX-compliant

  • Participants
  • Parent commits 031e7be
  • Branches pep428

Comments (0)

Files changed (1)

File pathlib.py

View file
                 pass
             else:
                 return
-        flags = os.O_CREAT
+        flags = os.O_CREAT | os.O_WRONLY
         if not exist_ok:
             flags |= os.O_EXCL
         fd = self._raw_open(flags, mode)