+ }
+
+ char *from_sidecar_path = get_sidecar_path(_from);
+ char *to_sidecar_path = get_sidecar_path(_to);
+
+ // FIXME: Remove to_sidecar_path if it exists ?
+ if (is_regular_file(from_sidecar_path)) {
+ if (rename(from_sidecar_path, to_sidecar_path) == -1) {
+ error_print("Error renaming sidecar. from: %s to: %s\n", from_sidecar_path, to_sidecar_path);
+ }
+ }
+ free(from_sidecar_path);
+ free(to_sidecar_path);
+
+ free(_from);
+ free(_to);