Project

General

Profile

ActionsLike0

Feature #13568

closed

File#path for O_TMPFILE fds has no meaning

Added by sorah (Sorah Fukumori) almost 8 years ago. Updated over 7 years ago.

Status:
Closed
Target version:
-
[ruby-core:81164]

Description

By using File::TMPFILE (O_TMPFILE) allows us to create a file without directory entries.

While open(2) with O_TMPFILE don't create a file without directory entries, it still requires a directory name to determine a file system to create a file.

Current Ruby implementation holds such directory names in fptr->pathv and retrievable via File#path.
But such paths are useless and may raise errors. For example, some code 1 checks File#path availability then when available, it attempts to use the path to open a file in different fd, finally raises Errno::EISDIR.

This patch changes File#path (fptr->pathv) not to return String if a fd is opened with O_TMPFILE.


Files


Related issues 1 (1 open0 closed)

Related to Ruby - Feature #13577: Digest.file accidentally receives File object but uses file pathAssignednobu (Nobuyoshi Nakada)Actions
#5

Updated by sorah (Sorah Fukumori) almost 8 years ago

  • Status changed from Open to Closed

Updated by sorah (Sorah Fukumori) almost 8 years ago

  • Status changed from Closed to Open

Updated by sorah (Sorah Fukumori) almost 8 years ago

  • Status changed from Open to Assigned
  • Assignee set to sorah (Sorah Fukumori)
#18

Updated by naruse (Yui NARUSE) almost 8 years ago

  • Related to Feature #13577: Digest.file accidentally receives File object but uses file path added
#23

Updated by duerst (Martin Dürst) almost 8 years ago

  • Subject changed from File#path for O_TMPFILE fds are unmeaning to File#path for O_TMPFILE fds has no meaning

Updated by sorah (Sorah Fukumori) over 7 years ago

#29

Updated by sorah (Sorah Fukumori) over 7 years ago

  • Status changed from Assigned to Closed
ActionsLike0

Also available in: Atom PDF