mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
File transfer protocol: use O_NOFOLLOW when opening regular files
This commit is contained in:
@@ -188,6 +188,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- When watching for changed config files do not recursively watch all sub directories of the directory containing the config file (:iss:`10102`)
|
- When watching for changed config files do not recursively watch all sub directories of the directory containing the config file (:iss:`10102`)
|
||||||
|
|
||||||
|
- File transfer protocol: use O_NOFOLLOW when opening regular files
|
||||||
|
|
||||||
|
|
||||||
0.47.1 [2026-05-28]
|
0.47.1 [2026-05-28]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ class DestFile:
|
|||||||
if self.actual_file is None:
|
if self.actual_file is None:
|
||||||
self.make_parent_dirs()
|
self.make_parent_dirs()
|
||||||
self.unlink_existing_if_needed()
|
self.unlink_existing_if_needed()
|
||||||
flags = os.O_RDWR | os.O_CREAT | os.O_TRUNC | getattr(os, 'O_CLOEXEC', 0) | getattr(os, 'O_BINARY', 0)
|
flags = os.O_RDWR | os.O_CREAT | os.O_TRUNC | getattr(os, 'O_CLOEXEC', 0) | getattr(os, 'O_BINARY', 0) | getattr(os, 'O_NOFOLLOW', 0)
|
||||||
self.actual_file = open(os.open(self.name, flags, self.permissions), mode='r+b', closefd=True)
|
self.actual_file = open(os.open(self.name, flags, self.permissions), mode='r+b', closefd=True)
|
||||||
af = self.actual_file
|
af = self.actual_file
|
||||||
if decompressed or is_last:
|
if decompressed or is_last:
|
||||||
|
|||||||
Reference in New Issue
Block a user