search for: make_absolut

Displaying 14 results from an estimated 14 matches for "make_absolut".

Did you mean: make_absolute
2016 Apr 18
2
Redundant Twine->StringRef->Twine conversions in llvm::sys::fs::make_absolute?
llvm::sys::fs::make_absolute converts its first parameter (const Twine &current_directory) to StringRef p(path.data(), path.size()), and then passes that StringRef to several functions (path::has_root_directory, path::has_root_name, and path::append) that accept Twines as parameters. Since llvm::StringRef can implicitly c...
2009 Feb 12
2
[patch] hard link protocol extension for sftp
...quot; @@ -1111,6 +1114,7 @@ parse_args(const char **cpp, int *pflag, } break; case I_RENAME: + case I_LINK: case I_SYMLINK: if (argc - optidx < 2) { error("You must specify two paths after a %s " @@ -1250,6 +1254,11 @@ parse_dispatch_command(struct sftp_conn path2 = make_absolute(path2, *pwd); err = do_rename(conn, path1, path2); break; + case I_LINK: + path1 = make_absolute(path1, *pwd); + path2 = make_absolute(path2, *pwd); + err = do_link(conn, path1, path2); + break; case I_SYMLINK: path2 = make_absolute(path2, *pwd); err = do_symlink(conn, path1, pat...
2002 Nov 05
0
[PATCH] Add getlink command to sftp
...uot;); *************** *** 582,587 **** --- 585,591 ---- case I_CHDIR: case I_LCHDIR: case I_LMKDIR: + case I_GETLINK: /* Get pathname (mandatory) */ if (get_pathname(&cp, path1)) return(-1); *************** *** 682,687 **** --- 686,695 ---- case I_SYMLINK: path2 = make_absolute(path2, *pwd); err = do_symlink(conn, path1, path2); + break; + case I_GETLINK: + path1 = make_absolute(path1, *pwd); + err = do_getlink(conn, path1); break; case I_RM: path1 = make_absolute(path1, *pwd); *** sftp-client.h@@\main\1 Tue Oct 1 17:26:26 2002 --- sftp-client.h We...
2022 Nov 11
1
Memory leak, make_absolute_pwd_glob
We had one more report from Coverity Scan after we brought 9.1p1 into the FreeBSD base system. It complains that calls like "path1 = make_absolute_pwd_glob(path1, *pwd);" in sftp.c leak the allocation. All make_absolute_pwd_glob() calls but one are of that form, so perhaps have it consume and free the first arg, as below (and https://reviews.freebsd.org/D37253)? diff --git a/crypto/openssh/sftp.c b/crypto/openssh/sftp.cindex c3c347e08...
2007 Dec 12
0
Revisiting sftp tab completion patch
...ar *file, int remote) +{ + glob_t g; + char *tmp, *tmp2, *pwd; + u_int len; + + if (file == NULL) + return (0); + + len = strlen(file) + 2; /* NULL + Wildcard */ + tmp = xmalloc(len); + snprintf(tmp, len, "%s*", file); + + memset(&g, 0, sizeof(g)); + if (remote != LOCAL) { + tmp = make_absolute(tmp, remote_path); + remote_glob(conn, tmp, 0, NULL, &g); + } else + glob(tmp, GLOB_DOOFFS, NULL, &g); + + xfree(tmp); + + if (g.gl_matchc == 0) + return (0); + + tmp2 = complete_ambiguous(file, g.gl_pathv, g.gl_matchc); + tmp = path_strip(tmp2, remote_path); + xfree(tmp2); + + if (g...
2002 Oct 18
1
Patch: sftp client support of "ls [flags] [path [localfile]]" feature
...*** 897,903 **** break; case I_LS: if (!path1) { ! do_globbed_ls(conn, *pwd, *pwd, lflag); break; } --- 939,945 ---- break; case I_LS: if (!path1) { ! do_globbed_ls(conn, *pwd, *pwd, lflag, NULL); break; } *************** *** 908,914 **** path1 = make_absolute(path1, *pwd); ! do_globbed_ls(conn, path1, tmp, lflag); break; case I_LCHDIR: if (chdir(path1) == -1) { --- 950,956 ---- path1 = make_absolute(path1, *pwd); ! do_globbed_ls(conn, path1, tmp, lflag, path2); break; case I_LCHDIR: if (chdir(path1) == -1) { *** sftp...
2013 Jan 08
1
sftp "cd" command to drive letter under cygwin
.../cygdrive/d I submitted this problem to the cygwin forum, but perhaps that was not the correct place: http://cygwin.com/ml/cygwin/2012-12/msg00160.html Since cygwin is supposed to support DOS paths as well as UNIX paths, and the lcd is working, I thought I'd take a look at it. I found the make_absolute function in sftp.c was assuming an absolute path starts with '/', but this is not true on Windows. I think the attached sftp.c.diff file is the fix, for your review, although there is a behavior change I'd like to discuss below. Previously, under Cygwin, in sftp, "cd d:" w...
2003 Oct 30
2
sftp client reget reput
...static int +#ifdef REGET +process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag, int rflag) +#else process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag) +#endif { char *tmp_dst = NULL; char *abs_dst = NULL; @@ -557,7 +584,11 @@ abs_dst = make_absolute(tmp, pwd); printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst); +#ifdef REGET + if (do_upload(conn, g.gl_pathv[i], abs_dst, pflag, rflag) == -1) +#else if (do_upload(conn, g.gl_pathv[i], abs_dst, pflag) == -1) +#endif err = -1; } @@ -789,6 +820,10 @@ switch (cmdnum)...
2002 Feb 06
2
SFTP Status Bar..
...ing %s to %s\n", g.gl_pathv[i], abs_dst); - if (do_download(in, out, g.gl_pathv[i], abs_dst, pflag) == -1) + if (do_download(in, out, g.gl_pathv[i], abs_dst, pflag, + updateprogressmeter) == -1) err = -1; xfree(abs_dst); abs_dst = NULL; @@ -462,8 +481,8 @@ } abs_dst = make_absolute(abs_dst, pwd); } - printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst); - err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag); + err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag, + updateprogressmeter); goto out; } @@ -486,8 +505,8 @@ } else abs_dst...
2009 Sep 29
4
[Bug 1655] New: sftp is unhappy with asterisks in filenames
https://bugzilla.mindrot.org/show_bug.cgi?id=1655 Summary: sftp is unhappy with asterisks in filenames Product: Portable OpenSSH Version: 5.2p1 Platform: Other OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: sftp AssignedTo: unassigned-bugs at mindrot.org
2002 Feb 02
0
Version two of progressbar for scp/sftp
...ing %s to %s\n", g.gl_pathv[i], abs_dst); - if (do_download(in, out, g.gl_pathv[i], abs_dst, pflag) == -1) + if (do_download(in, out, g.gl_pathv[i], abs_dst, pflag, + updateprogressmeter) == -1) err = -1; xfree(abs_dst); abs_dst = NULL; @@ -464,8 +483,8 @@ } abs_dst = make_absolute(abs_dst, pwd); } - printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst); - err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag); + err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag, + updateprogressmeter); goto out; } @@ -488,8 +507,8 @@ } else abs_dst...
2003 Oct 01
1
3.7.1p2 sftp recurse patch
...+634,7 @@ } for (i = 0; g.gl_pathv[i]; i++) { - if (!is_reg(g.gl_pathv[i])) { + if (!is_reg(g.gl_pathv[i]) && !(recursion && is_dir(g.gl_pathv[i]))) { error("skipping non-regular file %s", g.gl_pathv[i]); continue; @@ -557,7 +663,8 @@ abs_dst = make_absolute(tmp, pwd); printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst); - if (do_upload(conn, g.gl_pathv[i], abs_dst, pflag) == -1) + if (do_recursive_upload(conn, g.gl_pathv[i], abs_dst, + pflag) == -1) err = -1; } @@ -881,6 +988,7 @@ case I_HELP: case I_VERSION: ca...
2008 Jul 21
2
sftp needs a long time for sending a filelist
Hello all Im using sftp 1:4.7p1-8ubuntu1.2 in a batchjob Ive noticed that sftp needs a long time for sending a filelist. The timespan increases exponential if many files are on the remoteserver. for example "ls -la *.txt" needs 10 seconds for 2000 files but needs 50 seconds for 4000 files. For 150.000 Files i have to wait 15 minutes for example but the
2002 Jan 30
1
Quick sftp status indicator.
...2001/12/19 07:18:56 1.41 +++ sftp-int.c 2002/01/29 23:16:32 @@ -382,7 +382,6 @@ err = -1; goto out; } - printf("Fetching %s to %s\n", g.gl_pathv[0], abs_dst); err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag); goto out; } @@ -464,7 +463,6 @@ } abs_dst = make_absolute(abs_dst, pwd); } - printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst); err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag); goto out; }