This question is answered.


Permlink Replies: 8 - Pages: 1 - Last Post: 20 Jul 26, 23:29 Last Post By: davidekholm
JohnnyBalubas

Posts: 24
Registered: 3-May-2017
Same name on different fileformats.....
Posted: 19 Jul 26, 12:50
 
  Click to reply to this thread Reply
Attachment clip.jpg (127.2 KB)
When creating an new "empty page" and name it exactly like an image in that folder (except the file extension), the new page gets a thumbnail from the picture. This goes for folders also.
In the attached pic, in order: Image, a page, a folder all with the same name the last two is only for showing how the page and folder icons should look like

If I rename the imagefile the pagefile and folder loses the connection and gets the "normal" representive pic after I update, but not vice versa. This is only in jalbum desktop program, not in the published page.

It's extremely confusing for me. But maybe it's supposed to work this way?
davidekholm

Posts: 4,000
Registered: 18-Oct-2002
Re: Same name on different fileformats.....
Posted: 19 Jul 26, 14:29   in response to: JohnnyBalubas in response to: JohnnyBalubas
Helpful
  Click to reply to this thread Reply
It's simply not a handled case. The consequences of having the same base name but different extensions is unspecified. Perhaps we should at least detect and warn.
JeffTucker

Posts: 8,492
Registered: 31-Jan-2006
Re: Same name on different fileformats.....
Posted: 19 Jul 26, 14:37   in response to: JohnnyBalubas in response to: JohnnyBalubas
Helpful
  Click to reply to this thread Reply
Think about this for a moment. Let's say you have mydog.jpg, mydog.mp4, and mydog.pdf, all in the same folder. The core produces a thumbnail for the image: thumbs/mydog.jpg. Then it produces a thumbnail for the video: thumbs/mydog.jpg. Then it produces a thumbnail for the PDF: thumbs/mydog.jpg. See the problem?

As David suggests, the core should warn about this condition. I wouldn't want it to start guessing about how to fix it, however - the user might want to handle it differently in different situations.
JohnnyBalubas

Posts: 24
Registered: 3-May-2017
Re: Same name on different fileformats.....
Posted: 19 Jul 26, 15:07   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
Think about this for a moment. Let's say you have mydog.jpg, mydog.mp4, and mydog.pdf, all in the same folder. The core produces a thumbnail for the image: thumbs/mydog.jpg. Then it produces a thumbnail for the video: thumbs/mydog.jpg. Then it produces a thumbnail for the PDF: thumbs/mydog.jpg. See the problem?

Yes I can see that it causes problems but it only complies to mediafiles. Anyway, I have no bigger issue with this. I stumbled over the "problem" when trying out some things with my home page and thought it was a bug.

Thanks for Your responce.....and case closed!
JeffTucker

Posts: 8,492
Registered: 31-Jan-2006
Re: Same name on different fileformats.....
Posted: 19 Jul 26, 15:11   in response to: JohnnyBalubas in response to: JohnnyBalubas
 
  Click to reply to this thread Reply
But you run into similar problems with links to folders, extra pages, slide pages, and so on. There are all sorts of landmines lurking in there when you have duplicated base names of any type.

The core should be able to spot these, and warn the user. It gets tricky with the added pages, however, because the conflicts might not crop up until you get into a subfolder. If the skin is reusing a page that's been added to the root, the core might have difficulty predicting the clash.
JohnnyBalubas

Posts: 24
Registered: 3-May-2017
Re: Same name on different fileformats.....
Posted: 19 Jul 26, 15:26   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I agree - it woul'd absolutely be better to warn about it.
RobM

Posts: 4,047
Registered: 4-Aug-2006
Re: Same name on different fileformats.....
Posted: 19 Jul 26, 15:32   in response to: JohnnyBalubas in response to: JohnnyBalubas
 
  Click to reply to this thread Reply
For anyone else reading this thread see Naming of files and folders
for more information on avoiding problems with file naming.
RobM

Posts: 4,047
Registered: 4-Aug-2006
Re: Same name on different fileformats.....
Posted: 20 Jul 26, 16:23   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
It's simply not a handled case. The consequences of having the same base name but different extensions is unspecified. Perhaps we should at least detect and warn.
There is an external tool that will check a project for duplicate base names, https://jalbum.net/forum/thread.jspa?threadID=59945&tstart=0
davidekholm

Posts: 4,000
Registered: 18-Oct-2002
Re: Same name on different fileformats.....
Posted: 20 Jul 26, 23:29   in response to: RobM in response to: RobM
Correct
  Click to reply to this thread Reply
jAlbum now warns about base file name collisions in v39.7. See https://jalbum.net/software/release-notes
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums