Thread View: news.software.readers
1 messages
1 total messages
Started by Olly Betts
Sun, 22 Sep 1996 00:00
slrn: patch to fix decoding problems when using local spool backend
Author: Olly Betts
Date: Sun, 22 Sep 1996 00:00
Date: Sun, 22 Sep 1996 00:00
63 lines
2914 bytes
2914 bytes
The slrn local spool backend changes directory to the spool directory for
the current group (I did it like this on the thinking that it would be more
efficient than using absolute paths). However, decoding uucode/base64
postings also changes the current directory, with the result that you have
to exit the group after decoding, as otherwise you can't read any more
articles.
Here's a patch for slrn 0.9.0.0 to fix this. It simply changes the current
directory before opening an article, which isn't terribly clever, but works.
Before I fix this better, I want to look into whether it's worth changing
directory onto the spool or not.
There's another bug related to using the local spool -- paths relative to
spool_inn_root don't get resolved correctly if you set spool_inn_root in
your .slrnrc. This is caused by things getting initialised in the wrong
order, and John tells me he believes it to be fixed in his development
version. In the meantime, the workaround is to give absolute paths for
spool_active_file, etc.
Olly
--- spool.c.orig Sun Sep 22 13:54:09 1996
+++ spool.c Sun Sep 22 13:57:35 1996
@@ -259,6 +259,9 @@
/* ugly temporary use of buffer !HACK! */
p = buf;
+ /* Quick fix for problem of uudecode.c changing current directory */
+ if (chdir (Spool_Group)) return ERR_NOARTIG; /* No such article in this group */
+
Spool_fh_local = fopen (p,"r");
if (NULL == Spool_fh_local)
{
@@ -864,6 +867,10 @@
Spool_cur_artnum = n;
sprintf (num,"%d",n);
spool_fclose_local();
+
+ /* Quick fix for problem of uudecode.c changing current directory */
+ if (chdir (Spool_Group)) return -1;
+
Spool_fh_local = fopen (num,"rb"); /* fopen the article in question */
if (Spool_fh_local == NULL)
return -1;
@@ -1093,6 +1100,10 @@
if ((msgid == NULL) || (*msgid == 0)) return NULL;
id=spool_find_artnum_from_msgid(msgid);
sprintf(buf,"%d",id); /* !HACK! brief buf abuse */
+
+ /* Quick fix for problem of uudecode.c changing current directory */
+ if (chdir (Spool_Group)) return NULL;
+
Spool_fh_local=fopen(buf,"r");
if (!Spool_fh_local)
return NULL;
--
cool wet grass cool wet grass cool wet grass cool wet grass cool wet grass
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads