Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f41a7d2
)
Move path_separator stuff out in the open in os_read_file_name() for curses.
author
David Griffith
<dave@661.org>
Tue, 12 Feb 2019 13:18:46 +0000
(
05:18
-0800)
committer
David Griffith
<dave@661.org>
Tue, 12 Feb 2019 13:18:46 +0000
(
05:18
-0800)
src/curses/ux_input.c
patch
|
blob
|
history
diff --git
a/src/curses/ux_input.c
b/src/curses/ux_input.c
index afbccf701b98ffea06746254f836c4a95ec8a369..11dae34a87aa9720496fde99dc2f846c028c4930 100644
(file)
--- a/
src/curses/ux_input.c
+++ b/
src/curses/ux_input.c
@@
-744,6
+744,9
@@
char *os_read_file_name (const char *default_name, int flag)
char path_separator[2];
char file_name[FILENAME_MAX + 1];
+ path_separator[0] = PATH_SEPARATOR;
+ path_separator[1] = 0;
+
/* Turn off playback and recording temporarily */
istream_replay = 0;
ostream_record = 0;
@@
-792,9
+795,6
@@
char *os_read_file_name (const char *default_name, int flag)
* someone tries it.
*/
if (f_setup.restricted_path != NULL) {
- path_separator[0] = PATH_SEPARATOR;
- path_separator[1] = 0;
-
for (i = strlen(file_name); i > 0; i--) {
if (file_name[i] == PATH_SEPARATOR) {
i++;