[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-bug: [Bug 698565] Re: Save button doesn't respect permissions



Hmm. For this kind of problem, I usually ask myself: "What would Emacs
do?"  I will investigate tomorrow.

In the meantime:

- We should be able to successfully save to a file that we have write perms for but not read perms.
- We need to decide whether or not failing to create the backup means that we also don't write the file.
- How do we cope with the case that we don't have write perms for the directory containing the file?
- How do we deal with the possibility that either file or backup or both exist and are not regular files?

I appreciate that these are the sorts of questions that lead to "just
scrap it and try again", and I understand if you don't want to deal with
that. But I'd happily commit a version of your patch with an added /*!
\bug ... */ comment pointing out the race condition.

-- 
You received this bug notification because you are a member of gEDA Bug
Team, which is subscribed to gEDA.
https://bugs.launchpad.net/bugs/698565

Title:
  Save button doesn't respect permissions

Status in GPL Electronic Design Automation tools:
  Triaged

Bug description:
  File->Save _sometimes_ fails to respect file-permissions.

  For example, when modifying a file with permissions:
  -r--r--r-- 1 pcjc2 pcjc2 510 2008-12-27 10:23 /home/pcjc2/geda/share/gEDA/sym/analog/resistor-2.sym

  The log window often gets the following text:
  o_save: Could not open [/home/pcjc2/geda/share/gEDA/sym/analog/resistor-2.sym]
  Could NOT save page [/home/pcjc2/geda/share/gEDA/sym/analog/resistor-2.sym]
  (Arguably we just need one descriptive message with a reason).

  However; on some occasions, the file gets overritten, creating a new file with permissions:
  -rw-r--r-- 1 pcjc2 pcjc2 490 2008-12-27 10:29 /home/pcjc2/geda/share/gEDA/sym/analog/resistor-2.sym

  Obviously this is not good!

To manage notifications about this bug go to:
https://bugs.launchpad.net/geda/+bug/698565/+subscriptions


_______________________________________________
geda-bug mailing list
geda-bug@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-bug