Bugzilla – Attachment 2325 Details for
Bug 2138
SFTP interactive local rm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
sftp local remove
file_2138.txt (text/plain), 1.71 KB, created by
Loganaden Velvindron
on 2013-08-01 18:15:06 AEST
(
hide
)
Description:
sftp local remove
Filename:
MIME Type:
Creator:
Loganaden Velvindron
Created:
2013-08-01 18:15:06 AEST
Size:
1.71 KB
patch
obsolete
>Index: sftp.c >=================================================================== >RCS file: /cvs/openssh/sftp.c,v >retrieving revision 1.161 >diff -u -p -r1.161 sftp.c >--- sftp.c 25 Jul 2013 01:56:52 -0000 1.161 >+++ sftp.c 1 Aug 2013 08:09:26 -0000 >@@ -155,6 +155,7 @@ extern char *__progname; > #define I_VERSION 22 > #define I_PROGRESS 23 > #define I_REGET 26 >+#define I_LRM 27 > > struct CMD { > const char *c; >@@ -185,6 +186,7 @@ static const struct CMD cmds[] = { > { "lmkdir", I_LMKDIR, LOCAL }, > { "ln", I_LINK, REMOTE }, > { "lpwd", I_LPWD, LOCAL }, >+ { "lrm", I_LRM, LOCAL }, > { "ls", I_LS, REMOTE }, > { "lumask", I_LUMASK, NOARGS }, > { "mkdir", I_MKDIR, REMOTE }, >@@ -251,6 +253,7 @@ help(void) > "lmkdir path Create local directory\n" > "ln [-s] oldpath newpath Link remote file (-s for symlink)\n" > "lpwd Print local working directory\n" >+ "lrm path Delete local file\n" > "ls [-1afhlnrSt] [path] Display remote directory listing\n" > "lumask umask Set local umask to 'umask'\n" > "mkdir path Create remote directory\n" >@@ -1237,6 +1240,20 @@ parse_args(const char **cpp, int *aflag, > /* Only "rm" globs */ > if (cmdnum != I_RM) > undo_glob_escape(*path1); >+ break; >+ case I_LRM: >+ if (argc - optidx < 1) { >+ error("You must specify a file"); >+ return -1; >+ } >+ *path1 = xstrdup(argv[optidx]); >+ if (unlink(*path1) != 0) { >+ error("Unable to remove local file: %s", >+ strerror(errno)); >+ return -1; >+ } >+ else >+ return 0; > break; > case I_DF: > if ((optidx = parse_df_flags(cmd, argv, argc, hflag,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2138
: 2325