- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
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.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
if (sscanf(rec, "%d %d", &attr->file_index, &attr->type) != 2) {
Jmsg(jcr, M_FATAL, 0, _("Error scanning attributes: %s\n"), rec);
Dmsg1(100, "\nError scanning attributes. %s\n", rec);
return 0;
}
if (sscanf(rec, "%d %d", &attr->file_index, &attr->type) != 2) {
Jmsg(jcr, M_FATAL, 0, _("Error scanning attributes: %s\n"), rec);
Dmsg1(100, "\nError scanning attributes. %s\n", rec);
return 0;
}
- Dmsg2(100, "Got Attr: FilInx=%d type=%d\n", attr->file_index, attr->type);
+ Dmsg2(400, "Got Attr: FilInx=%d type=%d\n", attr->file_index, attr->type);
attr->file_index, attr->type, attr->fname, attr->attr, attr->lname,
attr->attrEx, attr->data_stream);
*attr->ofname = 0;
attr->file_index, attr->type, attr->fname, attr->attr, attr->lname,
attr->attrEx, attr->data_stream);
*attr->ofname = 0;
- * a drive letter -- we simply change the drive
- * from, for example, c: to c/ for
- * every filename if a prefix is supplied.
+ * a drive letter -- we simply change the drive
+ * from, for example, c: to c/ for
+ * every filename if a prefix is supplied.
int wherelen = strlen(jcr->where);
pm_strcpy(attr->ofname, jcr->where); /* copy prefix */
if (win32_client && attr->fname[1] == ':') {
int wherelen = strlen(jcr->where);
pm_strcpy(attr->ofname, jcr->where); /* copy prefix */
if (win32_client && attr->fname[1] == ':') {
}
pm_strcat(attr->ofname, fn); /* copy rest of name */
/*
* Fixup link name -- if it is an absolute path
*/
if (attr->type == FT_LNKSAVED || attr->type == FT_LNK) {
}
pm_strcat(attr->ofname, fn); /* copy rest of name */
/*
* Fixup link name -- if it is an absolute path
*/
if (attr->type == FT_LNKSAVED || attr->type == FT_LNK) {
- bool add_link;
- /* Always add prefix to hard links (FT_LNKSAVED) and
- * on user request to soft links
- */
- if (attr->lname[0] == '/' &&
- (attr->type == FT_LNKSAVED || jcr->prefix_links)) {
- pm_strcpy(attr->olname, jcr->where);
- add_link = true;
- } else {
- attr->olname[0] = 0;
- add_link = false;
- }
- if (win32_client && attr->lname[1] == ':') {
- attr->lname[1] = '/'; /* turn : into / */
- }
- fn = attr->lname; /* take whole name */
- /* Ensure where is terminated with a slash */
- if (add_link && jcr->where[wherelen-1] != '/' && fn[0] != '/') {
- pm_strcat(attr->olname, "/");
- }
- pm_strcat(attr->olname, fn); /* copy rest of link */
+ bool add_link;
+ /* Always add prefix to hard links (FT_LNKSAVED) and
+ * on user request to soft links
+ */
+ if (attr->lname[0] == '/' &&
+ (attr->type == FT_LNKSAVED || jcr->prefix_links)) {
+ pm_strcpy(attr->olname, jcr->where);
+ add_link = true;
+ } else {
+ attr->olname[0] = 0;
+ add_link = false;
+ }
+ if (win32_client && attr->lname[1] == ':') {
+ attr->lname[1] = '/'; /* turn : into / */
+ }
+ fn = attr->lname; /* take whole name */
+ /* Ensure where is terminated with a slash */
+ if (add_link && jcr->where[wherelen-1] != '/' && fn[0] != '/') {
+ pm_strcat(attr->olname, "/");
+ }
+ pm_strcat(attr->olname, fn); /* copy rest of link */
p = encode_mode(attr->statp.st_mode, buf);
p += sprintf(p, " %2d ", (uint32_t)attr->statp.st_nlink);
p += sprintf(p, "%-8.8s %-8.8s", getuser(attr->statp.st_uid, en1, sizeof(en1)),
p = encode_mode(attr->statp.st_mode, buf);
p += sprintf(p, " %2d ", (uint32_t)attr->statp.st_nlink);
p += sprintf(p, "%-8.8s %-8.8s", getuser(attr->statp.st_uid, en1, sizeof(en1)),
- getgroup(attr->statp.st_gid, en2, sizeof(en2)));
- p += sprintf(p, "%8.8s ", edit_uint64(attr->statp.st_size, ec1));
+ getgroup(attr->statp.st_gid, en2, sizeof(en2)));
+ p += sprintf(p, "%10.10s ", edit_uint64(attr->statp.st_size, ec1));