Changeset 24299
- Timestamp:
- Jun 2, 2009, 10:53:58 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous-Server/lib/Nebulous/Server.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/lib/Nebulous/Server.pm
r24294 r24299 20 20 use File::Path; 21 21 use File::Spec; 22 use IO::File; 22 23 use Log::Log4perl qw( :levels ); 23 24 use Nebulous::Key qw( parse_neb_key parse_neb_volume ); … … 1647 1648 # update each instances 1648 1649 foreach my $inst (@$locations) { 1649 chmod $mode, URI->new($inst)->path 1650 my $path = URI->new($inst)->path; 1651 chmod $mode, $path 1650 1652 or $log->logdie("chmod() failed: $!"); 1653 # XXX I'm assuming that it's OK to fsync() a filehandle that's only 1654 # open for reading? Opening as w/rw here can fail if the chmod removes 1655 # write permissions. 1656 my $fh = IO::File->new($path, "r") 1657 or $log->logdie("open() of $path failed: $!");; 1658 # fsync(3c) 1659 $fh->sync; 1660 close ($fh) 1661 or $log->logdie("close() failed: $!"); 1651 1662 } 1652 1663
Note:
See TracChangeset
for help on using the changeset viewer.
