X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffile.C;h=2a1330059cd468069f5e248f6343846445776e8f;hp=3202057403e7c2540e8f8db3174963da546283aa;hb=02c179665199bb8bd1b057f83c26c070ce618901;hpb=64dfa27066d9994d97a14fb2c21e60cba679dc5c diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C index 32020574..2a133005 100644 --- a/cinelerra-5.1/cinelerra/file.C +++ b/cinelerra-5.1/cinelerra/file.C @@ -1666,7 +1666,14 @@ int File::record_fd() void File::get_exe_path(char *result, char *bnp) { // Get executable path, basename +#if !defined(__FreeBSD__) int len = readlink("/proc/self/exe", result, BCTEXTLEN-1); +#else + char exe_path[BCTEXTLEN]; + sprintf(exe_path,"/proc/%d/file",getpid()); + int len = readlink(exe_path, result, BCTEXTLEN-1); +#endif + if( len >= 0 ) { result[len] = 0; char *ptr = strrchr(result, '/');