hardlink videos as well
authorgc <gc>
Mon, 7 Nov 2005 22:20:52 +0000 (22:20 +0000)
committergc <gc>
Mon, 7 Nov 2005 22:20:52 +0000 (22:20 +0000)
bin/booh-backend

index b34272e1af9786c2015f0339dc56af30896e7e0f..eeb4da864d0e081150cb34c39dbd4d242614b388 100755 (executable)
@@ -802,7 +802,14 @@ def walk_source_dir
             end
             destvideo = "#{dest_dir}/#{video}"
             if !File.exists?(destvideo)
-                psys("cp '#{dir}/#{video}' '#{destvideo}'")
+                if $hardlinks_ok
+                    if ! sys("ln '#{dir}/#{video}' '#{destvideo}'")
+                        $hardlinks_ok = false
+                    end
+                end
+                if ! $hardlinks_ok
+                    psys("cp '#{dir}/#{video}' '#{destvideo}'")
+                end
             end
         }