Your message dated Wed, 06 Apr 2011 16:04:30 -0400
with message-id <[email protected]>
and subject line remind: does not resolve tilde in include file
has caused the Debian Bug report #584170,
regarding remind: does not resolve tilde in include file path
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
584170: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584170
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: remind
Version: 03.01.05-2
Severity: normal
Tags: patch
Hi.
putting "INCLUDE ~/.somethingelse" into ~/.reminders yields
".reminders(1): Can't open file: ~/.somethingelse" when executing
remind -c .reminders.
this seems like a bug to me, since ~ is where a user probably wants to
put his reminders...
the attached patch simply replaces ^~ by $HOME just before fopen is
called. i hope it's not too much a hack...
regards
felix
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-7-owl (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages remind depends on:
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
remind recommends no packages.
Versions of packages remind suggests:
ii tkremind 03.01.05-2 Tk GUI interface to remind
ii wyrd 1.4.4-1 text-based calendar application
-- no debconf information
--- src.orig/files.c 2008-03-25 04:12:37.000000000 +0100
+++ src/files.c 2010-06-02 00:53:33.715406754 +0200
@@ -1,3 +1,4 @@
+// vim:ts=8:sw=4:
/***************************************************************/
/* */
/* FILES.C */
@@ -239,8 +240,18 @@ int OpenFile(char const *fname)
if (DebugFlag & DB_TRACE_FILES) {
fprintf(ErrFp, "Reading `-': Reading stdin\n");
}
+/* Resolve tilde */
} else {
- fp = fopen(fname, "r");
+ if( fname[0] == '~' ) {
+ char* home = getenv("HOME");
+ int n = strlen(fname) + strlen(home);
+ char* fnametmp = (char*) malloc( n*sizeof(char) );
+ sprintf( fnametmp, "%s%s", home, fname+1 );
+ fp = fopen(fnametmp, "r");
+ free(fnametmp);
+ } else {
+ fp = fopen(fname, "r");
+ }
if (DebugFlag & DB_TRACE_FILES) {
fprintf(ErrFp, "Reading `%s': Opening file on disk\n", fname);
}
--- End Message ---
--- Begin Message ---
Closing this issue. Upstream has provided the "remind" way to handle OP
request.
--
KBK
--- End Message ---