projects
/
pxelator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d85584
)
read symlink destination istead of content
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 6 Aug 2009 18:43:55 +0000
(18:43 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 6 Aug 2009 18:43:55 +0000
(18:43 +0000)
lib/PXElator/client.pm
patch
|
blob
|
history
diff --git
a/lib/PXElator/client.pm
b/lib/PXElator/client.pm
index
9000639
..
1c062f5
100644
(file)
--- a/
lib/PXElator/client.pm
+++ b/
lib/PXElator/client.pm
@@
-28,8
+28,13
@@
sub conf {
write_file $path, $default;
warn "default $path = $default";
$value = $default;
- } else {
- $value = read_file $path if -e $path;
+ } elsif ( -e $path ) {
+ if ( -l $path ) {
+ $value = readlink $path;
+ $value =~ s{.*/([^/]+)$}{$1};
+ } else {
+ $value = read_file $path;
+ }
}
return $value;
}