Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8aa3a244
Commit
8aa3a244
authored
Jan 27, 1998
by
Richard M. Stallman
Browse files
(file_name_as_directory): For an empty name, return "/".
parent
a2286b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/fileio.c
src/fileio.c
+7
-3
No files found.
src/fileio.c
View file @
8aa3a244
...
...
@@ -484,11 +484,15 @@ file_name_as_directory (out, in)
{
int
size
=
strlen
(
in
)
-
1
;
if
(
size
<
0
)
error
(
"Empty file name"
);
strcpy
(
out
,
in
);
if
(
size
<
0
)
{
out
[
0
]
=
'/'
;
out
[
1
]
=
0
;
return
out
;
}
#ifdef VMS
/* Is it already a directory string? */
if
(
in
[
size
]
==
':'
||
in
[
size
]
==
']'
||
in
[
size
]
==
'>'
)
...
...
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