r2000 - Fix file.pl so it will setup different filetypes correctly again...

18 views
Skip to first unread message

com...@warewulf.lbl.gov

unread,
Oct 18, 2016, 2:48:49 PM10/18/16
to warewul...@lbl.gov
Author: jms
Date: 2016-10-18 11:48:33 -0700 (Tue, 18 Oct 2016)
New Revision: 2000

Modified:
trunk/provision/cgi-bin/file.pl
Log:
Fix file.pl so it will setup different filetypes correctly again...



Modified: trunk/provision/cgi-bin/file.pl
===================================================================
--- trunk/provision/cgi-bin/file.pl 2016-08-07 15:23:43 UTC (rev 1999)
+++ trunk/provision/cgi-bin/file.pl 2016-10-18 18:48:33 UTC (rev 2000)
@@ -83,11 +83,14 @@
if ($timestamp and $timestamp >= $obj_timestamp) {
next;
}
- $metadata{$obj_timestamp} .= sprintf("%s %s %s %s %04o %s %s\n",
+
+ my $obj_ftype = $obj->filetypestring();
+ $metadata{$obj_timestamp} .= sprintf("%s %s %s %s %s%04o %s %s\n",
$obj->id() || "NULL",
$obj->name() || "NULL",
$obj->uid() || "0",
$obj->gid() || "0",
+ (($obj_ftype eq '-') ? (' ') : ($obj_ftype)),
$obj->mode() || "0000",
$obj_timestamp,
$obj->path() || "NULL"

Reply all
Reply to author
Forward
0 new messages