X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffile.C;h=f0b393029718d8e0acb4632aad13a1f1042020fb;hb=6c6367a007ab0f67538ad165e5815e66183a3997;hp=3202057403e7c2540e8f8db3174963da546283aa;hpb=d9b017e32a5b83ff44b56b2707c1c32bf2f59935;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C index 32020574..f0b39302 100644 --- a/cinelerra-5.1/cinelerra/file.C +++ b/cinelerra-5.1/cinelerra/file.C @@ -1,6 +1,7 @@ /* * CINELERRA * Copyright (C) 2010 Adam Williams + * Copyright (C) 2003-2016 Cinelerra CV contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1666,7 +1667,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, '/');