Opened 13 years ago
Closed 3 years ago
#10325 closed Patch - Feature (Trac EOL)
Modify mythlink.pl to allow relative file names to be used in the links
Reported by: | Owned by: | sphery | |
---|---|---|---|
Priority: | minor | Milestone: | needs_triage |
Component: | Contributed Scripts & Apps | Version: | 0.24-fixes |
Severity: | medium | Keywords: | mythlink.pl relative |
Cc: | Ticket locked: | no |
Description
This is useful if your links directory and recordings directory are both in a directory tree exported by an NFS server. Links to absolute file names will be broken in the NFS clients, but links to relative file names will be ok.
E.g., if /home is exported on an NFS server with the following dirs:
/home/nick/links
/home/mythtv/recordings
...and the exported /home is mounted by an NFS client at /mnt/mythtv, then
/mnt/mythtv/nick/links/Title.mpg -> /home/mythtv/recordings/1004_20111224115800.mpg
is broken
/mnt/mythtv/nick/links/Title.mpg -> ../../mythtv/recordings/1004_20111224115800.mpg
is ok
The attached patch adds a --relative
option to allow relative file names to be used in the links created by mythlink.pl
.
Attachments (1)
Change History (9)
Changed 13 years ago by
Attachment: | mythlink.pl.patch added |
---|
comment:1 Changed 13 years ago by
Owner: | changed from xris to sphery |
---|---|
Status: | new → accepted |
comment:2 Changed 13 years ago by
Component: | Apps - Nuvexport → Contributed Scripts & Apps |
---|
comment:4 Changed 12 years ago by
Replying to mythtvorg@…: The "should be":
$local_path = File::Spec->abs2rel($local_path, $dirname);
Should really be:
$local_path = File::Spec->abs2rel($local_path, $directory);
$dirname is undefined.
comment:5 Changed 12 years ago by
You are absolutely right! For some reason, I typo'd when copying over the code...
comment:6 Changed 7 years ago by
Duplicate ticket/patch posted at #13115 . The implementation from the other ticket is at https://github.com/MythTV/mythtv/pull/149 .
comment:7 Changed 4 years ago by
Milestone: | unknown → needs_triage |
---|
There is a bug in this patch!
The added line:
Should be:
Because $name may be of form "tv_show/episode" in which case the final directory will be attached to $name and missing from $dest.
Luckily, the existing code defines already: my $directory = dirname("$dest/$name");