projects
/
cloudstore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f12fec5
)
use File::ExtAttr instead of shell commands
author
Dobrica Pavlinusic
<dpavlin@rsync1.maxxo.com>
Fri, 18 May 2012 12:05:56 +0000
(14:05 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rsync1.maxxo.com>
Fri, 18 May 2012 12:05:56 +0000
(14:05 +0200)
lib/CloudStore/MD5sum.pm
patch
|
blob
|
history
diff --git
a/lib/CloudStore/MD5sum.pm
b/lib/CloudStore/MD5sum.pm
index
6d701cc
..
f0e08f3
100644
(file)
--- a/
lib/CloudStore/MD5sum.pm
+++ b/
lib/CloudStore/MD5sum.pm
@@
-4,17
+4,18
@@
use strict;
use Carp qw(confess carp);
use Data::Dump qw(dump);
use Carp qw(confess carp);
use Data::Dump qw(dump);
+use File::ExtAttr ':all';
sub md5_get {
my ( $self, $path ) = @_;
sub md5_get {
my ( $self, $path ) = @_;
- my $md5 =
`attr -q -g md5 "$path"`
;
+ my $md5 =
getfattr( $path, 'md5' )
;
warn "## md5_get $path $md5\n";
return $md5;
}
sub md5_set {
my ( $self, $path, $md5 ) = @_;
warn "## md5_get $path $md5\n";
return $md5;
}
sub md5_set {
my ( $self, $path, $md5 ) = @_;
- s
ystem qq|attr -q -s md5 -V $md5 "$path"|
;
+ s
etfattr( $path, md5 => $md5 )
;
warn "## md5_set $path $md5\n";
return $md5;
}
warn "## md5_set $path $md5\n";
return $md5;
}