[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Arx-users] Gnome-vfs errors when accessing arx.adamantix.org archiv
From: |
Walter Landry |
Subject: |
Re: [Arx-users] Gnome-vfs errors when accessing arx.adamantix.org archive |
Date: |
Mon, 02 Oct 2006 23:17:55 -0700 (PDT) |
Walter Landry <address@hidden> wrote:
> Tero Koskinen <address@hidden> wrote:
> > Hi,
> >
> > I am unable to access Arx archive at http://arx.adamantix.org/archive.
> > I have tried with two different operating systems (OpenBSD 4.0-beta
> > and Debian 3.1) from two different locations.
>
> I am getting a similar error. Let me work on it a bit, and I will get
> back to you.
I am sorry it took so long. It turns out that there is a bug in
gnome-vfs. If you ask for too many URL's too quickly, gnome-vfs
erroneously gives a permission denied error. This happens even if you
call gnomevfs-copy. To work around this, I added an exponential
backoff when copying files. It is a simple fix to
src/arx/libarx/gvfs/copy.cpp, which I am attaching n full.
Let me know if you have any other problems.
Cheers,
Walter Landry
address@hidden
/* Copies one file to another.
Copyright (C) 2004 Walter Landry
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 dated June, 1991.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA */
#include <iostream>
#include "gvfs.hpp"
namespace gvfs
{
void copy(const uri &source, const uri &target)
{
Capture_Error capture;
GnomeVFSURI *source_uri, *target_uri;
bool throw_error(false);
source_uri=gnome_vfs_uri_new(source.escaped_string().c_str());
target_uri=gnome_vfs_uri_new(target.escaped_string().c_str());
GnomeVFSResult error_code;
for(int i=1; i<100; i*=2)
{
error_code=
gnome_vfs_xfer_uri(source_uri,target_uri,GNOME_VFS_XFER_DEFAULT,
GNOME_VFS_XFER_ERROR_MODE_ABORT,
GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
0,0);
if(error_code!=GNOME_VFS_OK)
{
throw_error=true;
if(Command_Info::verbosity>=default_output)
std::cerr << "copy failed " << i << " "
<< gnome_vfs_result_to_string(error_code) << " "
<< source.escaped_string() << " "
<< target.escaped_string() << " "
<< std::endl
<< "retrying in " << i << " seconds"
<< std::endl;
sleep(i);
}
else
{
throw_error=false;
break;
}
}
if(throw_error)
throw exception("Transferring Files",error_code,source,target);
}
}
- Re: [Arx-users] Gnome-vfs errors when accessing arx.adamantix.org archive,
Walter Landry <=