Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 29680 Details for
Bug 22814
setting of calendar dir in xcalendar-4.0 needs improvement
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Prepends $HOME to *calendarDir entries that don't start with '/'
xcalendar-4.0-calendarDir.patch (text/plain), 1.21 KB, created by
Doug Weimer
on 2004-04-20 00:54:23 UTC
(
hide
)
Description:
Prepends $HOME to *calendarDir entries that don't start with '/'
Filename:
MIME Type:
Creator:
Doug Weimer
Created:
2004-04-20 00:54:23 UTC
Size:
1.21 KB
patch
obsolete
>--- xcalendar-vanilla/dayeditor.c 1995-09-30 21:54:55.000000000 -0700 >+++ xcalendar/dayeditor.c 2004-04-20 00:01:25.000586944 -0700 >@@ -252,16 +252,27 @@ > firstDay = FirstDay(month, year); > > if (calendarDir == NULL) { >+ homedir = getenv("HOME"); > if (appResources.calendarDir == NULL) { > /* open the ~/Calendar directory - create if necessary */ >- homedir = getenv("HOME"); > > calendarDir = XtMalloc(strlen(homedir) + 10); > strcpy(calendarDir, homedir); > strcat(strcat(calendarDir, "/"), "Calendar"); > } else { >- calendarDir = XtMalloc(strlen(appResources.calendarDir) + 3); >- strcpy(calendarDir, appResources.calendarDir); >+ /* check fo absolute path */ >+ if (appResources.calendarDir[0] == '/') >+ { >+ /* calendarDir is an absolute /xxxxx path */ >+ calendarDir = XtMalloc(strlen(appResources.calendarDir) + 3); >+ strcpy(calendarDir, appResources.calendarDir); >+ } else { >+ /* not absolute -> prefix homedir */ >+ calendarDir = XtMalloc(strlen(homedir) + >+ strlen(appResources.calendarDir) + 3); >+ strcpy(calendarDir, homedir); >+ strcat(strcat(calendarDir, "/"), appResources.calendarDir); >+ } > } > } > error_status = stat(calendarDir, &dir_status);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22814
: 29680