From: Karai C. <ck...@us...> - 2007-03-22 13:18:12
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv405/krusader_kde3/krusader/VFS Modified Files: ftp_vfs.cpp vfile.cpp vfile.h Log Message: FIXED: [ 1629447 ] can not view file in an archive with perm 600 Index: vfile.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/vfile.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** vfile.h 31 Dec 2006 18:55:16 -0000 1.22 --- vfile.h 22 Mar 2007 13:18:09 -0000 1.23 *************** *** 39,42 **** --- 39,44 ---- #include <kmimetype.h> + #define PERM_ALL -2 + /** * The Virtual File class handles all the details of maintaining a single *************** *** 78,83 **** const QString& symDest, const mode_t mode, const QString& aclString = QString::null, ! const QString& aclDfltString = QString::null); bool operator==(const vfile& vf) const; --- 80,86 ---- const QString& symDest, const mode_t mode, + const int rwx = -1, const QString& aclString = QString::null, ! const QString& aclDfltString = QString::null ); bool operator==(const vfile& vf) const; Index: ftp_vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/ftp_vfs.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** ftp_vfs.cpp 10 Jan 2007 19:42:25 -0000 1.59 --- ftp_vfs.cpp 22 Mar 2007 13:18:09 -0000 1.60 *************** *** 68,71 **** --- 68,77 ---- void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) { + int rwx = -1; + + QString prot = vfs_origin.protocol(); + if( prot == "krarc" || prot == "tar" || prot == "zip" ) + rwx = PERM_ALL; + KIO::UDSEntryListConstIterator it = entries.begin(); KIO::UDSEntryListConstIterator end = entries.end(); *************** *** 96,100 **** // create a new virtual file object if ( kfi.user().isEmpty() ) ! temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode ); else { QString currentUser = vfs_origin.user(); --- 102,106 ---- // create a new virtual file object if ( kfi.user().isEmpty() ) ! temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode, rwx ); else { QString currentUser = vfs_origin.user(); *************** *** 111,118 **** temp = new vfile( name, size, perm, mtime, symLink, kfi.user(), kfi.group(), currentUser, ! mime, symDest, mode, kfi.ACL().asString(), kfi.defaultACL().asString() ); #else ! temp = new vfile( name, size, perm, mtime, symLink, kfi.user(), kfi.group(), currentUser, mime, symDest, mode ); #endif } --- 117,124 ---- temp = new vfile( name, size, perm, mtime, symLink, kfi.user(), kfi.group(), currentUser, ! mime, symDest, mode, kfi.ACL().asString(), rwx, kfi.defaultACL().asString() ); #else ! temp = new vfile( name, size, perm, mtime, symLink, kfi.user(), kfi.group(), currentUser, mime, symDest, mode, rwx ); #endif } Index: vfile.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/vfile.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** vfile.cpp 31 Dec 2006 19:35:50 -0000 1.24 --- vfile.cpp 22 Mar 2007 13:18:09 -0000 1.25 *************** *** 89,94 **** const QString& symDest, const mode_t mode, const QString& aclString, ! const QString& aclDfltString){ vfile_name=name; vfile_size=size; --- 89,95 ---- const QString& symDest, const mode_t mode, + const int rwx, const QString& aclString, ! const QString& aclDfltString ){ vfile_name=name; vfile_size=size; *************** *** 111,119 **** vfile_has_acl = !aclString.isNull() || !aclDfltString.isNull(); vfile_acl_loaded = true; ! vfile_rwx = -1; } char vfile::vfile_isReadable() const { ! if( vfile_userName.isNull() ) return KRpermHandler::readable(vfile_perm,vfile_groupId,vfile_ownerId,vfile_rwx); else --- 112,122 ---- vfile_has_acl = !aclString.isNull() || !aclDfltString.isNull(); vfile_acl_loaded = true; ! vfile_rwx = rwx; } char vfile::vfile_isReadable() const { ! if( vfile_rwx == PERM_ALL ) ! return ALLOWED_PERM; ! else if( vfile_userName.isNull() ) return KRpermHandler::readable(vfile_perm,vfile_groupId,vfile_ownerId,vfile_rwx); else *************** *** 122,126 **** char vfile::vfile_isWriteable() const { ! if( vfile_userName.isNull() ) return KRpermHandler::writeable(vfile_perm,vfile_groupId,vfile_ownerId,vfile_rwx); else --- 125,131 ---- char vfile::vfile_isWriteable() const { ! if( vfile_rwx == PERM_ALL ) ! return ALLOWED_PERM; ! else if( vfile_userName.isNull() ) return KRpermHandler::writeable(vfile_perm,vfile_groupId,vfile_ownerId,vfile_rwx); else *************** *** 129,133 **** char vfile::vfile_isExecutable() const { ! if( vfile_userName.isNull() ) return KRpermHandler::executable(vfile_perm,vfile_groupId,vfile_ownerId,vfile_rwx); else --- 134,145 ---- char vfile::vfile_isExecutable() const { ! if( vfile_rwx == PERM_ALL ) ! { ! if(( vfile_mode & 0111 ) || vfile_isdir ) ! return ALLOWED_PERM; ! else ! return NO_PERM; ! } ! else if( vfile_userName.isNull() ) return KRpermHandler::executable(vfile_perm,vfile_groupId,vfile_ownerId,vfile_rwx); else |