(rmt_open__): Use base_name to compute base name.
#include "system.h"
+#include "basename.h"
+#include "safe-read.h"
+
/* Try hard to get EOPNOTSUPP defined. 486/ISC has it in net/errno.h,
3B2/SVR3 has it in sys/inet.h. Otherwise, like on MSDOS, use EINVAL. */
return -1;
#endif
}
- remote_shell_basename = strrchr (remote_shell, '/');
+ remote_shell_basename = base_name (remote_shell);
if (remote_shell_basename)
remote_shell_basename++;
else