Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
d6504364
Commit
d6504364
authored
Jul 23, 2014
by
Ivica Bukvic
Browse files
*finally fixed proper adding of full paths to the recent files.
parent
5970f751
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/s_main.c
View file @
d6504364
...
...
@@ -168,24 +168,15 @@ static void openit(const char *dirname, const char *filename)
close
(
fd
);
glob_evalfile
(
0
,
gensym
(
nameptr
),
gensym
(
dirbuf
));
sys_vgui
(
"pdtk_set_current_dir %s
\n
"
,
filename
);
char
actualpath
[
PATH_MAX
];
char
*
path_ptr
=
NULL
;
path_ptr
=
realpath
(
filename
,
actualpath
);
//sys_vgui("::pd_menus::update_recentfiles_menu .mbar.file 0\n");
if
(
strstr
(
filename
,
dirname
)
!=
NULL
)
//fprintf(stderr, "%s %s %s %s %s\n", dirname, filename,
// strstr(filename, dirname), actualpath, path_ptr);
if
(
path_ptr
!=
NULL
)
{
/* when opening files from a command line (at startup), filename
contains full path so, if dirname is already included in
filename we only pass filename variable otherwise combine the
two and send them together */
#ifndef MSW
sys_vgui
(
"::pd_guiprefs::update_recentfiles %s/%s 1
\n
"
,
dirname
,
filename
);
#else
sys_vgui
(
"::pd_guiprefs::update_recentfiles %s\%s 1
\n
"
,
dirname
,
filename
);
#endif
}
else
{
sys_vgui
(
"::pd_guiprefs::update_recentfiles %s 1
\n
"
,
filename
);
sys_vgui
(
"::pd_guiprefs::update_recentfiles %s 1
\n
"
,
actualpath
);
}
}
else
...
...
Write
Preview
Supports
Markdown
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