A challenging problem involving symbolic links.


 
Thread Tools Search this Thread
Top Forums Programming A challenging problem involving symbolic links.
# 1  
Old 03-23-2008
A challenging problem involving symbolic links.

Hello,

I'm working on an application that bridges together several applications involved in creating a video workflow for editing with digital cinema cameras. The main platform is MacOSX.

Because of the nature of some of the utilities for working with this video footage I must spoof filenames by using symbolic links to essentially rename files. This hack works great most of the time, but on some systems (possibly Leopard systems) it runs into problems, I've isolated them into two:

In some situations, a symbolically linked file won't be recognized by a program, and won't appear in the softwares non-cocoa file selector. But other times it does. A system reboot will often remedy the problem, but I seek a way to check for this for users of my bridge.

The second is sometimes the program will load a symbolic link, but it will refer to it by a /Volume path only. So for example it will refer to the path to the symbolic link as /Volumes/Macintosh HD/Users/Username/Desktop etc. instead of /Users/Username/Desktop ... etc. Again, only in some situation not in all. (I believe mostly on Leopard, but I'm not certain yet)

Looking to gain a deeper understanding of how symbolic links are processed by the system. Thanks in advance for any insights.

IBloom
# 2  
Old 03-24-2008
As a guess, your program is calling lstat() on the filename, under some cirumstances. This is a way to see if the file is a link.
By definition symbolic links should work, but some developer is not playing fair. Try reading the source of the app that fails.

Possibly to prevent something like what you are trying to do.

Last edited by jim mcnamara; 03-24-2008 at 08:18 AM..
# 3  
Old 03-24-2008
Quote:
Originally Posted by jim mcnamara
As a guess, your program is calling lstat() on the filename, under some cirumstances. This is a way to see if the file is a link.
By definition symbolic links should work, but some developer is not playing fair. Try reading the source of the app that fails.

Possibly to prevent something like what you are trying to do.
I don't think it's intentional. And it only happens on some systems, but all running the same version of the same software.

The plot thickens as in some cases the program sees the path as /
Volumes/Macintosh HD/Volumes/Macintosh HD/Users/Username/Desktop..
Can't figure it out, its making a loop around the mount point or something.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Symbolic links

Soft link,Hard link brief explanation (1 Reply)
Discussion started by: RAJU KAVATI
1 Replies

2. UNIX for Dummies Questions & Answers

Symbolic links in UNIX

Hi, I have a file with more than 1 layers of soft links for it. For ex. ls -la .profile .profile@ -> /home/act/.profile_abc ls -la /home/act/.profile_abc@ -> .profile_final I want to get the name of the last file (i.e. .profile_final) when I refer to .profile using shell script. I... (2 Replies)
Discussion started by: deo_kaustubh
2 Replies

3. UNIX for Dummies Questions & Answers

Permissioning for symbolic links

I've just started using UNIX in a Linux vmplayer. I'm trying to run the command: ln -s `pwd`/$1 `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`/$1 in a script from an online tutorial, but I keep getting an error message: ln: creating symbolic link... (1 Reply)
Discussion started by: ChipT
1 Replies

4. UNIX for Dummies Questions & Answers

Symbolic Links

Hi all, I have scoured the entire forum for this but to no avail unfortunately. Basically, I would like to remove my symbolic link from my folder name i.e. foldername -> /a/b/c/d/f where f is indeed a folder. I have tried rmdir but this does not work and in actual fact deletes the... (4 Replies)
Discussion started by: cyberfrog
4 Replies

5. Solaris

symbolic links between servers

Hi Guys... I want to create a link using ln -s for a directory that does not exist on the box. How do I do that? I had some files from Box A directory /d1/u01 and I copied the files across to another Box lets say Box B on directory /d2/u02. Now I want a link so that this path /d1/u01... (2 Replies)
Discussion started by: Phuti
2 Replies

6. AIX

IHS 6.1 on AIX - problem with symlinks / symbolic links / softlinks

Hello, I got an IHS 6.1 installed and want to publish a directory with an index of files, directories and symlinks / symbolic links / soft links, last ones being created with the usual Unix command "ln -s .... ....". In httpd.conf I've tried following for that directory: Options Indexes... (1 Reply)
Discussion started by: zaxxon
1 Replies

7. AIX

Symbolic Links

I am linking a directory as follows: ln -sf /home/xxx/userid/real_files/* /home/xxx/userid/linked_files This gives me symbolic links for all the files in the real_files directory in the linked_files directory. My question is, if I go and remove a file in the real_files directory and then go... (1 Reply)
Discussion started by: rcarnesiii
1 Replies

8. Solaris

cp a dty without symbolic links?

Hi, - we have copy (cp command) to do to save all the contents of a dty BUT we dont want to copy the files corresponding to symbolic links contained whithin this dty - the box is a sun solaris one - and the cp commande do not say avything about that? thanks for help Jakez (7 Replies)
Discussion started by: JAKEZ
7 Replies

9. OS X (Apple)

Problem changing owner of symbolic links?

Strangely, chown and chmod don't seem to work on symlinks. In particular, I tried this (as root): # touch foo # ln -s foo mysymlink # chown SOMEUSER mysymlink as well as changing the last line to: # chown -h someuser mysymlink where "-h" is supposed to change the UID of the actualy... (1 Reply)
Discussion started by: noahcowan
1 Replies

10. UNIX for Dummies Questions & Answers

Finding symbolic links

How can I find all symbolic links across the network to a directory (2 Replies)
Discussion started by: mehtad
2 Replies
Login or Register to Ask a Question