[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: setPassword doesn't work at all ( was Ark development against RAR
From:       Raphael Kubo da Costa <kubito () gmail ! com>
Date:       2010-09-19 4:15:09
Message-ID: 83tylm4bea.wl%kubito () gmail ! com
[Download RAW message or body]

At Sun, 19 Sep 2010 11:53:57 +0800,
Aaron Lewis wrote:
> >> ListJob* ArchiveBase::list()
> >> {
> >> if ( isRarFile() && rarIsProtected() ) {
> >> m_isPasswordProtected = true;
> >>
> >> PasswordNeededQuery *query = new PasswordNeededQuery(
> >> fileName() , true );
> >> query->execute();
> >> qDebug() << query->password(); // Got outputs , all good.
> >> if (query->password().isEmpty() ) return NULL;
> >> setPassword ( query->password() ); // Fails ? Nothing works ,
> >> it still stuck on listing ... ;-(
> >> }
> >> ...
> >> }
> >
> > No, there's no class for detecting protections. Judging from the
> > behaviour you mention in the comments, the rar/unrar process is
> > probably stuck waiting for the password input -- if you run "unrar vt
> > foo.rar" and foo.rar is header-protected the first thing the process
> > adoes is wait for a password before listing the archive contents.
> Nope , using a process calling unrar to test an archive encryptions is
> a slow , stupid way , for its limited performance with extremely large
> files.
> 
> I've already found another way to work out , no limitations at all.
> As there's no relevant class to do the detection , let's organize it
> off-list.
> 
> Anyway ,

OK, for the purpose of this discussion let us assume these are valid
axioms ;)

> isRarFile() && rarIsProtected() never hangs for most of the time.
> 
> It hangs because setPassword is not working with file header
> encryption , cause i could see my password with qDebug() ..

Have you tried to do some debugging to find out why it is not working?
In this case, ReadOnlyArchiveInterface::setPassword() is still being
used, and it just sets m_password to the value you passed to it. You
need to use this value in CliInterface (or in the rar plugin) and pass
it to the unrar process.

> > You might want to go the KPty way, which is what Ark used to do
> > before, but that means it will not work on Windows, for example.
> Since i never play on Windows machines , i don't really care it for
> the while ...

Well, it's just that I'd rather keep Ark functional on Windows, that
is, a solution that works on all platforms would certainly have much
more chances of being accepted than one that only works on Unix systems.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic