aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-12 13:27:25 +0100
committerThomas White <taw@physics.org>2021-03-12 13:28:06 +0100
commit9edd14304236313e458dc920570ca6aeee6e5b10 (patch)
treedcabd1399afb9255529754afc00a8bce7093efee /libcrystfel
parent1862584055980608d10d4a3708351b0c8ff034b7 (diff)
FromFile indexer: Remove getcwd()
It's only used for some error messages, and it doesn't compile anyway.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/indexers/fromfile.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libcrystfel/src/indexers/fromfile.c b/libcrystfel/src/indexers/fromfile.c
index 4da01d78..cb1fb150 100644
--- a/libcrystfel/src/indexers/fromfile.c
+++ b/libcrystfel/src/indexers/fromfile.c
@@ -175,7 +175,6 @@ void *fromfile_prepare(char *solution_filename, UnitCell *cell)
struct fromfile_entries *sol_hash = NULL;
struct fromfile_entries *item = NULL;
float params[NPARAMS_PER_LINE];
- char cwd[PATH_MAX];
/* Assembling solution file name from input file name*/
char *path_to_sol;
@@ -188,18 +187,13 @@ void *fromfile_prepare(char *solution_filename, UnitCell *cell)
strcat(path_to_sol, core_name);
strcat(path_to_sol, extension);
- if (getcwd(cwd, sizeof(cwd)) != NULL) {
- ERROR("Cannot identify current directory\n");
- }
-
fh = fopen(path_to_sol, "r");
if ( fh == NULL ) {
- ERROR("%s not found by fromfile_prepare in %s\n",
- path_to_sol, cwd);
+ ERROR("%s not found by fromfile_prepare\n", path_to_sol);
return 0;
} else {
- STATUS("Found solution file %s at %s\n", path_to_sol, cwd);
+ STATUS("Found solution file %s\n", path_to_sol);
}
nlines = ncrystals_in_sol(path_to_sol);