aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui_export.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui_export.c b/src/gui_export.c
index 36f1a032..44a6ffc1 100644
--- a/src/gui_export.c
+++ b/src/gui_export.c
@@ -94,6 +94,8 @@ static int export_to_mtz(struct gui_merge_result *result,
SymOpList *sym;
int r;
char *crystal_name;
+ char *dir_name;
+ char *dir_basename;
reflist = read_reflections_2(result->hkl, &sym_str);
if ( reflist == NULL ) return 1;
@@ -102,15 +104,17 @@ static int export_to_mtz(struct gui_merge_result *result,
sym = get_pointgroup(sym_str);
if ( sym == NULL ) return 1;
- /* FIXME: Proposed labelling (GitLab #28):
- * project = basename of folder containing crystfel.project */
+ dir_name = getcwd(NULL, 0);
+ dir_basename = safe_basename(dir_name);
crystal_name = result->indexing_result_name;
if ( crystal_name == NULL ) {
crystal_name = "unknown";
}
r = write_to_mtz(reflist, sym, cell, min_res, max_res, filename,
- result->name, crystal_name, "project", bij);
+ result->name, crystal_name, dir_basename, bij);
+ free(dir_name);
+ free(dir_basename);
free_symoplist(sym);
free(sym_str);
reflist_free(reflist);