summaryrefslogtreecommitdiffstats
path: root/browser.c
diff options
context:
space:
mode:
authorMichael Elkins <me@sigpipe.org>2013-04-11 02:17:41 +0000
committerMichael Elkins <me@sigpipe.org>2013-04-11 02:17:41 +0000
commit0bb29c9956dad36197f92b5c1ef777f230587dc4 (patch)
tree187d2f08b19a5e5ea284a2907af47d1a82984e29 /browser.c
parent286a0b78cbdbb16adbdc889ca52c8783901592c6 (diff)
backout c1371176ea45
Diffstat (limited to 'browser.c')
-rw-r--r--browser.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/browser.c b/browser.c
index 3d69b9d4..cda4900a 100644
--- a/browser.c
+++ b/browser.c
@@ -615,11 +615,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
}
else
{
- if (getcwd (LastDir, sizeof (LastDir)) == NULL)
- {
- dprint(1, (debugfile, "%s:%d getcwd() returned NULL\n", __FILE__, __LINE__));
- LastDir[0] = '\0';
- }
+ getcwd (LastDir, sizeof (LastDir));
safe_strcat (LastDir, sizeof (LastDir), "/");
safe_strncat (LastDir, sizeof (LastDir), f, i);
}
@@ -629,13 +625,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
if (f[0] == '/')
strcpy (LastDir, "/"); /* __STRCPY_CHECKED__ */
else
- {
- if (getcwd (LastDir, sizeof (LastDir)) == NULL)
- {
- dprint(1, (debugfile, "%s:%d getcwd() returned NULL\n", __FILE__, __LINE__));
- LastDir[0] = '\0';
- }
- }
+ getcwd (LastDir, sizeof (LastDir));
}
if (i <= 0 && f[0] != '/')
@@ -650,13 +640,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
else
{
if (!folder)
- {
- if (getcwd (LastDir, sizeof (LastDir)) == NULL)
- {
- dprint(1, (debugfile, "%s:%d getcwd() returned NULL\n", __FILE__, __LINE__));
- LastDir[0] = '\0';
- }
- }
+ getcwd (LastDir, sizeof (LastDir));
else if (!LastDir[0])
strfcpy (LastDir, NONULL(Maildir), sizeof (LastDir));
@@ -675,13 +659,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num
while (i && LastDir[--i] == '/')
LastDir[i] = '\0';
if (!LastDir[0])
- {
- if (getcwd (LastDir, sizeof (LastDir)) == NULL)
- {
- dprint(1, (debugfile, "%s:%d getcwd() returned NULL\n", __FILE__, __LINE__));
- LastDir[0] = '\0';
- }
- }
+ getcwd (LastDir, sizeof (LastDir));
}
}