projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gamma yuva hist fix, theme change without exit
[goodguy/history.git]
/
cinelerra-5.0
/
cinelerra
/
file.C
diff --git
a/cinelerra-5.0/cinelerra/file.C
b/cinelerra-5.0/cinelerra/file.C
index 03315c01b8c2b9082af357b660e1a32938481a37..5742cf86ae3b08e9e87cf01042e6eb867b5faaa8 100644
(file)
--- a/
cinelerra-5.0/cinelerra/file.C
+++ b/
cinelerra-5.0/cinelerra/file.C
@@
-1652,19
+1652,13
@@
int File::record_fd()
void get_exe_path(char *result)
{
// Get executable path
void get_exe_path(char *result)
{
// Get executable path
- pid_t pid = getpid();
- char proc_path[BCTEXTLEN];
- int len = 0;
- result[0] = 0;
- sprintf(proc_path, "/proc/%d/exe", pid);
- if((len = readlink(proc_path, result, BCTEXTLEN)) >= 0)
- {
+ int len = readlink("/proc/self/exe", result, BCTEXTLEN);
+ if( len >= 0 ) {
result[len] = 0;
result[len] = 0;
-//printf("Preferences::Preferences %d %s\n", __LINE__, result);
char *ptr = strrchr(result, '/');
char *ptr = strrchr(result, '/');
- if(
ptr
) *ptr = 0;
+ if(
ptr
) *ptr = 0;
}
}
-
+ else
+ result[0] = 0;
}
}
-