[mythtv-users] / on the end or no /?

Shawn Asmussen asmussen at cox.net
Tue Aug 24 05:57:54 EDT 2004

> Are the following two settings supposed to have a slash on the end of
> them or not?  Could someone who has transcoding working log into your
> mythconverg database and do the following two select statements?
> mysql> select value,data from settings where value='LiveBufferDir';
> +---------------+-------------+
> | value         | data        |
> +---------------+-------------+
> | LiveBufferDir | /mnt/store/ |
> +---------------+-------------+
> 1 row in set (0.01 sec)
> mysql> select value,data from settings where value='RecordFilePrefix';
> +------------------+-------------+
> | value            | data        |
> +------------------+-------------+
> | RecordFilePrefix | /mnt/store/ |
> +------------------+-------------+
> 1 row in set (0.00 sec)
> I'm wondering if maybe the '/' on the end of those two values is causing
> me problems...

Although the code is probably written so that the slash on the end isn't
needed, it almost certainly isn't hurting anything. Unix and Unix-like
systems disregard the extra slashes. For example, cd /usr/local/bin, and
cd ////usr//local///bin///// will both get you where you want to go when
typed at a command prompt. Therefore, most of the time that Unix
programmers code a variable for a path into a program where a slash would
be needed to separate it from something that comes afterwards, they just
put that slash in the code themselves so that the user can either put the
slash at the end or not, and it won't make any difference.

Shawn Asmussen

More information about the mythtv-users mailing list