projects
/
booh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e44435
)
try to use hard links when creating an album including "original" size to space diskspace
author
gc
<gc>
Sat, 5 Nov 2005 18:40:00 +0000
(18:40 +0000)
committer
gc
<gc>
Sat, 5 Nov 2005 18:40:00 +0000
(18:40 +0000)
bin/booh-backend
patch
|
blob
|
history
diff --git
a/bin/booh-backend
b/bin/booh-backend
index 37d6be032b7717f8377a5c4d946025bbae188a53..bcb7fb3406ca700c0360f0c01b719bc62d1768cf 100755
(executable)
--- a/
bin/booh-backend
+++ b/
bin/booh-backend
@@
-70,6
+70,7
@@
$stdout.sync = true
$no_identify = false
$ignore_videos = false
$forgui = false
$no_identify = false
$ignore_videos = false
$forgui = false
+$hardlinks_ok = true
def usage
puts _("Usage: %s [OPTION]...") % File.basename($0)
def usage
puts _("Usage: %s [OPTION]...") % File.basename($0)
@@
-762,7
+763,14
@@
def walk_source_dir
end
destimg = "#{dest_dir}/#{img}"
if $limit_sizes =~ /original/ && !File.exists?(destimg)
end
destimg = "#{dest_dir}/#{img}"
if $limit_sizes =~ /original/ && !File.exists?(destimg)
- psys("cp '#{dir}/#{img}' '#{destimg}'")
+ if $hardlinks_ok
+ if ! sys("ln '#{dir}/#{img}' '#{destimg}'")
+ $hardlinks_ok = false
+ end
+ end
+ if ! $hardlinks_ok
+ psys("cp '#{dir}/#{img}' '#{destimg}'")
+ end
end
end
}
end
end
}