浏览代码

Include basename.h, save-read.h.
(rmt_open__): Use base_name to compute base name.

Paul Eggert 26 年之前
父节点
当前提交
8bbacf0b4f
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/rtapelib.c

+ 4 - 1
src/rtapelib.c

@@ -32,6 +32,9 @@
 
 
 #include "system.h"
 #include "system.h"
 
 
+#include "basename.h"
+#include "safe-read.h"
+
 /* Try hard to get EOPNOTSUPP defined.  486/ISC has it in net/errno.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.  */
    3B2/SVR3 has it in sys/inet.h.  Otherwise, like on MSDOS, use EINVAL.  */
 
 
@@ -410,7 +413,7 @@ rmt_open__ (const char *path, int open_mode, int bias, const char *remote_shell)
 	return -1;
 	return -1;
 #endif
 #endif
       }
       }
-    remote_shell_basename = strrchr (remote_shell, '/');
+    remote_shell_basename = base_name (remote_shell);
     if (remote_shell_basename)
     if (remote_shell_basename)
       remote_shell_basename++;
       remote_shell_basename++;
     else
     else