We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 928eee9 commit c708bc5Copy full SHA for c708bc5
trunk/export/NUV_SQL.pm
@@ -156,8 +156,15 @@ package export::NUV_SQL;
156
# Copy the file
157
else {
158
print "\nCopying $episode->{'filename'} to $self->{'path'}/$nuv_file\n";
159
- copy("$episode->{'filename'}", "$self->{'path'}/$nuv_file")
160
- or die "Couldn't copy specified .nuv file: $!\n\n";
+ # use hard links when copying within a filesystem
+ if ((stat($episode->{'filename'}))[0] == (stat($self->{path}))[0]) {
161
+ link("$episode->{'filename'}", "$self->{'path'}/$nuv_file")
162
+ or die "Couldn't hard link specified .nuv file: $!\n\n";
163
+ }
164
+ else {
165
+ copy("$episode->{'filename'}", "$self->{'path'}/$nuv_file")
166
+ or die "Couldn't copy specified .nuv file: $!\n\n";
167
168
}
169
170
0 commit comments