Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 161872 Details for
Bug 253342
nmh inc exit status bug
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch for this issue
fix-inc.patch (text/plain), 2.15 KB, created by
Josh Bressers
on 2007-08-20 13:18:50 UTC
(
hide
)
Description:
Patch for this issue
Filename:
MIME Type:
Creator:
Josh Bressers
Created:
2007-08-20 13:18:50 UTC
Size:
2.15 KB
patch
obsolete
>? cscope.out >? fix-inc.patch >? uip/inc.c.new >Index: h/utils.h >=================================================================== >RCS file: /sources/nmh/nmh/h/utils.h,v >retrieving revision 1.8 >diff -a -u -r1.8 utils.h >--- h/utils.h 14 Apr 2006 14:10:15 -0000 1.8 >+++ h/utils.h 20 Aug 2007 13:16:23 -0000 >@@ -9,6 +9,7 @@ > void *mh_xrealloc(void *, size_t); > char *pwd(void); > char *add(char *, char *); >+int folder_exists(char *); > void create_folder(char *, int, void (*)()); > int num_digits(int); > >Index: sbr/utils.c >=================================================================== >RCS file: /sources/nmh/nmh/sbr/utils.c,v >retrieving revision 1.9 >diff -a -u -r1.9 utils.c >--- sbr/utils.c 14 Apr 2006 14:10:16 -0000 1.9 >+++ sbr/utils.c 20 Aug 2007 13:16:24 -0000 >@@ -121,6 +121,29 @@ > } > > /* >+ * folder_exists >+ * Check to see if a folder exists. >+ */ >+int folder_exists(char *folder) >+{ >+ struct stat st; >+ int exists = 0; >+ >+ if (stat (folder, &st) == -1) { >+ /* The folder either doesn't exist, or we hit an error. Either way >+ * return a failure. >+ */ >+ exists = 0; >+ } else { >+ /* We can see a folder with the right name */ >+ exists = 1; >+ } >+ >+ return exists; >+} >+ >+ >+/* > * create_folder > * Check to see if a folder exists, if not, prompt the user to create > * it. >Index: uip/inc.c >=================================================================== >RCS file: /sources/nmh/nmh/uip/inc.c,v >retrieving revision 1.23 >diff -a -u -r1.23 inc.c >--- uip/inc.c 27 Apr 2006 12:00:28 -0000 1.23 >+++ uip/inc.c 20 Aug 2007 13:16:24 -0000 >@@ -563,10 +563,15 @@ > if ((maildir_copy = strdup(maildir)) == (char *)0) > adios (maildir, "error allocating memory to copy maildir"); > >- if (noisy) >- create_folder(maildir, 0, done); >- else >- done (1); >+ if (!folder_exists(maildir)) { >+ /* If the folder doesn't exist, and we're given the -silent flag, >+ * just fail. >+ */ >+ if (noisy) >+ create_folder(maildir, 0, done); >+ else >+ done (1); >+ } > > if (chdir (maildir) == NOTOK) > adios (maildir, "unable to change directory to");
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 253342
: 161872