mc/vfs/extfs/uarj
Norbert Warmuth 549fecfff7 Wed Dec 16 06:47:47 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* screen.c (Xtry_to_select): Don't select a similar file when
"name" can't be found in the panel (when deleting files the
selection jumpped from the deleted "file" to a directory which
started with the same character as "file", annoying).
Strip known vfs suffixes from "name" before trying to select
(I think Timur made this suggestion a few months ago). Know the
vfs is mature enough to do this.

* vfs/vfs.c (vfs_strip_suffix_from_filename): New function which strips
known vfs suffixes from a filename and returns a malloced string
which has to be freed. Possible improvement: strip vfs suffix from
last path component.

* vfs/extfs/*: added "umask 077" to every script.
1998-12-16 06:16:13 +00:00

35 lines
616 B
Bash

#! /bin/sh
#
# Copyright 1998 Pavel Machek,
# partly based on zip by Jakub Jelinek 1995
#
# Distribute in terms of GPL.
#
#
ARJ=mcunarj
mcarjfs_list ()
{
$ARJ v $1 | awk -v uid=${UID-0} '
BEGIN { hyphens=0 }
/^----------/ { if (hyphens > 0) exit 0; hyphens=1; next }
{
if (hyphens < 1) next;
path=$1;
getline;
printf "-rw-r--r-- 1 %-8d %-8d %8d %s-%s %s %s\n", uid, 0, $1, substr($4,4), substr($4,1,2), substr($5,1,5), path
}' 2>/dev/null
}
mcarjfs_copyout ()
{
$ARJ p $1 $2 2> $3 > /dev/null
}
umask 077
case "$1" in
list) mcarjfs_list $2; exit 0;;
copyout) mcarjfs_copyout $2 $3 $4; exit 0;;
esac
exit 1