[haiku-bugs] Re: [Haiku] #12334: MediaConvert does not check for read only target directory (easy)

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Mon, 06 Mar 2017 12:09:00 -0000

#12334: MediaConvert does not check for read only target directory (easy)
-------------------------------------------+----------------------------
   Reporter:  pulkomandy                   |      Owner:  Barrett
       Type:  bug                          |     Status:  assigned
   Priority:  normal                       |  Milestone:  R1
  Component:  Applications/MediaConverter  |    Version:  R1/Development
 Resolution:                               |   Keywords:
 Blocked By:                               |   Blocking:
Has a Patch:  1                            |   Platform:  All
-------------------------------------------+----------------------------

Comment (by axeld):

 Sorry, I was completely on the wrong track -- `access()` should indeed
 work nicely. What does not work is evaluating `stat()` information; they
 will contain the readable bit no matter if the device is being mount read-
 only or not. `access()` on the other hand must handle this case.
 What I had in mind was that you'd check whether or not it's a read-only
 file system, before doing the check using `access()`.

 So the patch does indeed look nice now!

 However, I don't think it fixes the main issue: MediaConverter does not
 report an error if it could not write the files. There are other reasons
 not being able to write to a volume (like when it's being full, or someone
 deleted your target parent directory).

--
Ticket URL: <https://dev.haiku-os.org/ticket/12334#comment:15>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: