LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-29-2005, 09:22 AM   #1
Melsync
Member
 
Registered: Sep 2005
Posts: 75

Rep: Reputation: 15
file path references are read with an extra '/'


This is a weird problem that involves one text file and one image file. The first is model.mtl, whose second line refers to the second file, model.jpg, as follows

map_Kd model.jpg

I however have this problem:
*.mtl files written in Linux are interpreted by most Windows apps as if 'model.jpg' had a '/' before it.
The file model.jpg doesn't load because the 3D apps understands that the path to model.jpg is:
//model.jpg
Obviously '/model.jpg' is not found.
It however should be read
/model.jpg

The command 'map_Kd' is interpreted by 3D apps as an instruction to load the file model.jpg. The model.mtl is the file that contains that instruction.
All 3D apps in Linux and else understand this.
The text files*.mtl are correct when opened in a text editor.
Those files where in the same directory when they were written by the Linux app.
What is happening?

Last edited by Melsync; 09-29-2005 at 09:37 AM.
 
Old 09-29-2005, 02:50 PM   #2
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
well, while i had a very hardtime reading your question, i think i understand your problem correctly. There is no problem with extra slashes. both

> cd /home/user//directory1///directory2

and

>cd /home/user/directory1/directory2

will do the same thing. it seems to me that the problem is that your pathname is missing the leading period '.'. for example:

> cd ./directory1

and

>cd /directory1

are not the same thing. the first will go into a directory located in your Current directory. the second will go to a directory named 'directory1' in the root directory (/). you need the . before the slash to specify a relative path as apposed to an absolute path.
 
Old 09-30-2005, 07:52 AM   #3
Melsync
Member
 
Registered: Sep 2005
Posts: 75

Original Poster
Rep: Reputation: 15
I'm sorry about my question not being clear.
I found that the problem lies in the 3D app. It can't connect the loaded .jpg to the .obj files.
I thought that this was a Windows problem reading Linux text files or the paths to files in text files written in Linux. Humm, this is embarrasing.
And thanks for the post. I learnt that pathnames with // or/// can be read by Linux, but Windows won't take \\ or \\\.
Melsync
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra path variables? mjm461 Linux - General 1 09-15-2005 02:21 PM
Trying to burn extra large .iso file! elliotfuller Suse/Novell 5 06-24-2005 07:18 AM
Extra Hard Drive FAT32 cant be read AndrewZorn Linux - Newbie 15 04-04-2005 07:15 AM
How to read the path? Gins Linux - General 17 11-17-2004 02:09 PM
Extra character in complemented file. softnayr Programming 1 09-25-2004 11:54 AM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration