From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] draft files aren't deleted when a draft message is deleted in the inbox
Date: Thu, 13 Sep 2007 18:34:49 -0700 [thread overview]
Message-ID: <1189733596-sup-2790@south> (raw)
In-Reply-To: <1189654538-sup-114@mona>
Excerpts from jeff.covey's message of Wed Sep 12 20:38:39 -0700 2007:
> i postponed a message and decided later not to finish it. it was in
> my inbox with a "draft" label. i hit "d", and it disappeared from the
> inbox, but ~/.sup/drafts/0 is still there with its contents.
Interesting. Are there weird permissions on that directory, that would
otherwise preclude you from deleting a file?
Can you apply this diagnostic patch and post the "XX" log messages,
please?
Index: lib/sup/draft.rb
===================================================================
--- lib/sup/draft.rb (revision 566)
+++ lib/sup/draft.rb (working copy)
@@ -35,7 +35,19 @@
raise ArgumentError, "can't find entry for draft: #{mid.inspect}" unless entry
raise ArgumentError, "not a draft: source id #{entry[:source_id].inspect}, should be #{DraftManager.source_id.inspect} for #{mid.inspect} / docno #{docid}" unless entry[:source_id].to_i == DraftManager.source_id
Index.drop_entry docid
- File.delete @source.fn_for_offset(entry[:source_info])
+
+ fn = @source.fn_for_offset(entry[:source_info])
+ Redwood::log "XX about to delete: #{fn}"
+ rv =
+ begin
+ File.delete fn
+ rescue Exception => e
+ Redwood::log "XX exception (e.class): #{e.message}"
+ nil
+ end
+ Redwood::log "XX deletion had return value #{rv.inspect}"
+ Redwood::log "XX file still there? #{File.exists? fn}"
+
UpdateManager.relay self, :delete, mid
end
end
--
William <wmorgan-sup at masanjin.net>
prev parent reply other threads:[~2007-09-14 1:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-13 3:38 jeff covey
2007-09-14 1:34 ` William Morgan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1189733596-sup-2790@south \
--to=wmorgan-sup@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox