Changeset 983
- Timestamp:
- 2000-02-28T11:11:18+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/util.pm
r836 r983 274 274 # make hard link to file if supported by OS, otherwise copy the file 275 275 sub hard_link { 276 my ($src, $dest) = @_;276 my ($src, $dest) = @_; 277 277 278 278 # remove trailing slashes from source and destination files … … 297 297 mk_all_dir($dest_dir) if (!-e $dest_dir); 298 298 299 if (!link($src,$dest)) 300 { 299 # link not supported on wondows 300 if ($ENV{'GSDLOS'} =~ /^windows$/i) { 301 &File::Copy::copy ($src, $dest); 302 303 } elsif (!link($src, $dest)) { 301 304 print STDERR "util::hard_link: unable to create hard link. "; 302 305 print STDERR " Attempting to copy file: $src -> $dest\n"; 303 306 &File::Copy::copy ($src, $dest); 304 307 } 305 306 308 } 307 309 308 310 # make soft link to file if supported by OS, otherwise return error 309 311 sub soft_link { 310 my ($src, $dest) = @_;312 my ($src, $dest) = @_; 311 313 312 314 # remove trailing slashes from source and destination files … … 323 325 mk_all_dir($dest_dir) if (!-e $dest_dir); 324 326 325 if (!symlink($src, $dest))327 if (!symlink($src, $dest)) 326 328 { 327 329 print STDERR "util::soft_link: unable to create soft link.";
Note:
See TracChangeset
for help on using the changeset viewer.