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
8600e6ed
Commit
8600e6ed
authored
Nov 17, 1994
by
Richard M. Stallman
Browse files
(init_filelock): Always copy lock_path.
parent
7c7daa22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/filelock.c
src/filelock.c
+8
-6
No files found.
src/filelock.c
View file @
8600e6ed
...
...
@@ -455,18 +455,20 @@ t if it is locked by you, else a string of the name of the locker.")
init_filelock
()
{
char
*
new_path
lock_path
=
egetenv
(
"EMACSLOCKDIR"
);
if
(
!
lock_path
)
lock_path
=
PATH_LOCK
;
/* Copy the path in case egetenv got it from a Lisp string. */
new_path
=
(
char
*
)
xmalloc
(
strlen
(
lock_path
)
+
2
);
strcpy
(
new_path
,
lock_path
);
lock_path
=
new_path
;
/* Make sure it ends with a slash. */
if
(
lock_path
[
strlen
(
lock_path
)
-
1
]
!=
'/'
)
{
char
*
new_path
=
(
char
*
)
xmalloc
(
strlen
(
lock_path
)
+
2
);
strcpy
(
new_path
,
lock_path
);
lock_path
=
new_path
;
strcat
(
lock_path
,
"/"
);
}
strcat
(
lock_path
,
"/"
);
superlock_path
=
(
char
*
)
xmalloc
((
strlen
(
lock_path
)
+
sizeof
(
SUPERLOCK_NAME
)));
...
...
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