Displaying 8 results from an estimated 8 matches for "lastdir".
2012 Jul 30
1
locked binding of setwd() in R 2.15.x causes .Rprofile to fail
...till work under R
2.14.2 and not fail under R 2.15?
Error in utils::assignInNamespace("setwd", function(dir) { :
locked binding of ?setwd? cannot be changed
######################
#-- functions from .Rprofile
# modify setwd() to also show the current path in the window title
# assigns .lastdir in the global environment
local({
oldsetwd <- setwd
utils::assignInNamespace("setwd",
function(dir) {
.lastdir <<- oldsetwd(dir)
utils::setWindowTitle( short.path(base::getwd()) )
.lastdir
}, "base")
})
# setwd replacement, allowing cd() to be like 'cd -' on un...
2013 Feb 07
1
assignInNamespace to create a setwd() replacement: how to use unlockBinding()?
...urning to the previously stored directory.
#### setwd-new.R ######
# .Rprofile functions to set current directory in WindowTitle
#======================
# setwd() replacement functions
#======================
oldsetwd <- base::setwd
utils::assignInNamespace("setwd",
function(dir) {
.lastdir <<- oldsetwd(dir)
utils::setWindowTitle( short.path(base::getwd()) )
.lastdir
}, "base")
# setwd replacement, allowing cd() to be like 'cd -' on unix (return to
last dir)
cd <- function(dir) {
if(missing(dir)) dir <- .lastdir
.lastdir <<- base::setwd(dir)
utils...
2004 May 02
1
SEGV on FreeBSD 4.8-STABLE with 2.6.2
I'm getting a SEGV on a FreeBSD 4.8-STABLE box. The client is Solaris
9/SPARC. Both boxes run 2.6.2.
The command I'm running is:
$ rsync -arHRv --numeric-ids --delete --exclude=/opt/dist/cdrom \
[paths] [server]:[path]
If I whittle down what appears in [paths], then it works.
$ gdb rsync rsync.core
gdb> bt
#0 0x280faf0d in strncmp () from /usr/lib/libc.so.4
#1 0x7 in ?? ()
#2
2003 Oct 03
2
Cygwin/rsync Hang Problem Testing Results
People of cygwin & rsync,
I recently attempted to get cygwin and rsync working to solve a
backup/mirroring need in my computer life. Well, as you might guess, I
ran into a little but of trouble.
Strangely enough, rsync seemed to be regularly hanging when I attempted
to do a "get" (sycronize a remote to a local dir). Well, considering I
want to automate this, that was not going
2008 Jan 31
1
DO NOT REPLY [Bug 5235] New: buffer overflow in receive_file_entry
...ml
I have tested 2.6.6 and 2.6.8
This fix is for 2.6.8
The changes I have made to fix my error were in
flist.c (489.c)
static struct file_struct *receive_file_entry(struct file_list *flist, unsigned
short flags, int f)
I changed the following lines:
static char lastname[MAXPATHLEN], *lastdir;
char thisname[MAXPATHLEN];
if (l2 >= MAXPATHLEN - l1) {
to:
static char lastname[BIGPATHBUFLEN], *lastdir;
char thisname[BIGPATHBUFLEN];
if (l2 >= BIGPATHBUFLEN - l1) {
I haven't done full debugged this, but it compiles and runs, and does wha...
2006 Mar 31
3
DO NOT REPLY [Bug 3649] New: buffer overflow in receive_file_entry
https://bugzilla.samba.org/show_bug.cgi?id=3649
Summary: buffer overflow in receive_file_entry
Product: rsync
Version: 2.6.0
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned@samba.org
ReportedBy: sambesselink@planet.nl
2004 Mar 10
4
HFS+ resource forks: WIP patch included
...nc-2.6.0-dar/flist.c
--- rsync-2.6.0/flist.c Mon Dec 15 03:10:31 2003
+++ rsync-2.6.0-dar/flist.c Wed Mar 10 11:29:32 2004
@@ -382,7 +382,7 @@
io_write_phase = "send_file_entry";
- fname = f_name(file);
+ fname = f_name_dst(file);
flags = base_flags;
@@ -737,7 +737,7 @@
if (lastdir && strcmp(fname, lastdir) == 0) {
file->dirname = lastdir;
} else {
- file->dirname = strdup(fname);
+ file->dirname = STRDUP(ap,fname);
lastdir = file->dirname;
}
file->basename = STRDUP(ap, p + 1);
@@ -804,6 +804,9 @@
struct file_struct *file;
exter...
2004 Feb 06
4
memory reduction
...g directories if we're not recursing, but this is not a very
* important case. Some systems may not have d_type.
**/
-struct file_struct *make_file(char *fname, int exclude_level)
+struct file_struct *make_file(char *fname,
+ struct file_list *flist, int exclude_level)
{
static char *lastdir;
static int lastdir_len = -1;
@@ -734,6 +739,7 @@ struct file_struct *make_file(char *fnam
char *basename, *dirname, *bp;
unsigned short flags = 0;
+
if (strlcpy(thisname, fname, sizeof thisname)
>= sizeof thisname - flist_dir_len) {
rprintf(FINFO, "skipping overly long n...