&& scols_line_set_data(ln, column_index, file->name))
err(EXIT_FAILURE, _("failed to add output data"));
- if (uri && (!file->name || *file->name != '/')) {
+ ftype = file->stat.st_mode & S_IFMT;
+ if (uri && (!file->name || *file->name != '/'
+ || (ftype != S_IFREG && ftype != S_IFDIR))) {
struct libscols_cell *ce = scols_line_get_cell(ln, column_index);
if (ce)
scols_cell_disable_uri(ce, 1);
wait "${MKFDS_PID}"
ts_finalize_subtest
+ts_init_subtest "character-device"
+{
+ coproc MKFDS { "$TS_HELPER_MKFDS" rw-character-device $FD; }
+ if read -r -u "${MKFDS[0]}" PID; then
+ for o in NAME KNAME; do
+ echo "# $o"
+ "${TS_CMD_LSFD}" -n --hyperlink=always -o "$o" -p "${PID}" -Q "$EXPR" | replace_hostname | "$TS_CMD_HEXDUMP" -C
+ done
+ echo DONE >&"${MKFDS[1]}"
+ fi
+} > "$TS_OUTPUT" 2>&1
+wait "${MKFDS_PID}"
+ts_finalize_subtest
+
ts_finalize