Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] draft files aren't deleted when a draft message is deleted in the inbox
@ 2007-09-13  3:38 jeff covey
  2007-09-14  1:34 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: jeff covey @ 2007-09-13  3:38 UTC (permalink / raw)


this may be part of my draft problem:

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.

thanks,

-- 
jeff covey
http://jeffcovey.net/



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [sup-talk] draft files aren't deleted when a draft message is deleted in the inbox
  2007-09-13  3:38 [sup-talk] draft files aren't deleted when a draft message is deleted in the inbox jeff covey
@ 2007-09-14  1:34 ` William Morgan
  0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2007-09-14  1:34 UTC (permalink / raw)


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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-14  1:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-13  3:38 [sup-talk] draft files aren't deleted when a draft message is deleted in the inbox jeff covey
2007-09-14  1:34 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox