Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
aeab8004
Commit
aeab8004
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: improve a few comments
parent
f8c33e86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/browser.c
+3
-4
src/browser.c
with
3 additions
and
4 deletions
+3
-4
src/browser.c
View file @
aeab8004
...
...
@@ -304,7 +304,7 @@ char *do_browser(char *path)
}
else
if
(
func
==
do_enter
)
{
struct
stat
st
;
/*
We can't move up from "/"
. */
/*
It isn't possible to move up from the root directory
. */
if
(
strcmp
(
filelist
[
selected
],
"/.."
)
==
0
)
{
statusline
(
ALERT
,
_
(
"Can't move up a directory"
));
continue
;
...
...
@@ -320,16 +320,15 @@ char *do_browser(char *path)
continue
;
}
#endif
/* If for some reason the file is inaccessible, complain. */
if
(
stat
(
filelist
[
selected
],
&
st
)
==
-
1
)
{
/* We can't open this file for some reason. Complain. */
statusline
(
ALERT
,
_
(
"Error reading %s: %s"
),
filelist
[
selected
],
strerror
(
errno
));
continue
;
}
/* If it isn't a directory, a file was selected -- we're done. */
if
(
!
S_ISDIR
(
st
.
st_mode
))
{
/* We've successfully opened a file, so we're done. */
retval
=
mallocstrcpy
(
NULL
,
filelist
[
selected
]);
break
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment