Mailing ListMailing List   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cannot save a file with a slash in the title

 
Post new topic   Reply to topic    www.hairersoft.com Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
jasonfist



Joined: 26 Jul 2011
Posts: 11

PostPosted: Tue Sep 27, 2011 6:51 am    Post subject: Cannot save a file with a slash in the title Reply with quote

Using a slash in the title of a saved file results in an error.

The workaround is to save without the slash and change the file name in the Finder afterwards, but if the Finder supports names with a slash, I'm not quite sure why Amadeus can't just save them itself.
Back to top
View user's profile Send private message
Martin Hairer
Site Admin


Joined: 08 Nov 2006
Posts: 1612

PostPosted: Tue Sep 27, 2011 7:31 am    Post subject: Cannot save a file with a slash in the title Reply with quote

Quote:
If the Finder supports names with a slash, I'm not quite sure why Amadeus can't just save them itself.

The support of slashes in filenames is a bit of a hack that Apple has been changing silently with every new major OS release, thus breaking most existing apps in the process.

The latest version of Amadeus Pro (2.0.4) should work fine in that regard, at least on OS 10.7 (but I think also on 10.6). Regards,

Martin

--
HairerSoft
http://www.hairersoft.com/




_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Martin Hairer
Site Admin


Joined: 08 Nov 2006
Posts: 1612

PostPosted: Tue Sep 27, 2011 8:17 pm    Post subject: Cannot save a file with a slash in the title Reply with quote

Just for those of you who are wondering: the reason why it is a hack is that Unix (and related) filesystems do not allow slashes in filenames, since this is the way directories are separated from subdirectories. However, for historical reasons (going back to the very early days of the Mac, way before Mac OS X), filenames on the Mac do allow slashes and it is the semicolon that plays the role of the forbidden character instead. (Try using the Finder to rename a file with a semicolon in the name…)

As a consequence, Mac OS internally stores filenames with semicolons (and this is what you see when you list a directory in the Terminal), but displays them as slashes in the Finder in order to be backwards-compatible to Methuselah.

So far, so good, but you can imagine that problems can arise because of this discrepancy: for all the Unix stuff, functions should return filenames without slashes, otherwise zillions of lines of code would break. For all the "Mac" stuff, functions should return filenames without semicolons, or another zillion of lines of code would break. In general, Apple has been pretty good at keeping the two separate, but there is one particular function call whose behaviour changed between 10.5 and 10.6. Apparently, this was unintentional and Apple treated it as a bug, but it took them until Mac OS 10.7 to revert the behaviour. In the meantime, I had circumvented the bug, so that the reversal to the "correct" behaviour caused AP to misbehave… Regards,

Martin

--
HairerSoft
http://www.hairersoft.com/




_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CDJonah_alt



Joined: 15 Mar 2007
Posts: 378

PostPosted: Tue Sep 27, 2011 8:45 pm    Post subject: Cannot save a file with a slash in the title Reply with quote

Bottom line -- avoid slashes and semicolons in file names -- why ask for trouble.

Chuck

On 9/27/11 3:17 PM, Martin Hairer wrote:
Quote:
Quote:
Just for those of you who are wondering: the reason why it is a hack is that Unix (and related) filesystems do not allow slashes in filenames, since this is the way directories are separated from subdirectories. However, for historical reasons (going back to the very early days of the Mac, way before Mac OS X), filenames on the Mac do allow slashes and it is the semicolon that plays the role of the forbidden character instead. (Try using the Finder to rename a file with a semicolon in the name…)

As a consequence, Mac OS internally stores filenames with semicolons (and this is what you see when you list a directory in the Terminal), but displays them as slashes in the Finder in order to be backwards-compatible to Methuselah.

So far, so good, but you can imagine that problems can arise because of this discrepancy: for all the Unix stuff, functions should return filenames without slashes, otherwise zillions of lines of code would break. For all the "Mac" stuff, functions should return filenames without semicolons, or another zillion of lines of code would break. In general, Apple has been pretty good at keeping the two separate, but there is one particular function call whose behaviour changed between 10.5 and 10.6. Apparently, this was unintentional and Apple treated it as a bug, but it took them until Mac OS 10.7 to revert the behaviour. In the meantime, I had circumvented the bug, so that the reversal to the "correct" behaviour caused AP to misbehave… Regards,

Martin

--
HairerSoft
http://www.hairersoft.com/





Quote:
_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message
pm@philxmilstein.com



Joined: 12 Nov 2006
Posts: 85

PostPosted: Tue Sep 27, 2011 9:03 pm    Post subject: Cannot save a file with a slash in the title Reply with quote

I believe you mean colon [:], which is illegal in Mac filneames, rather than
semicolon [;], which is (and always has been) legal.

Also, Photoshop, for one, automatically swaps a hyphen [-] for a slash [/]
(which is more correctly called "virgule") when it encounters one in a
filename. This is a much friendlier behavior than the Finder's abrupt
rejection of any attempt to confirm an illegal filename, and return only of
an error message that doesn't even bother to identify the specific problem.

--Phil M.


Martin Hairer wrote:

Quote:
Just for those of you who are wondering: the reason why it is a hack is that
Unix (and related) filesystems do not allow slashes in filenames, since this
is the way directories are separated from subdirectories. However, for
historical reasons (going back to the very early days of the Mac, way before
Mac OS X), filenames on the Mac do allow slashes and it is the semicolon that
plays the role of the forbidden character instead. (Try using the Finder to
rename a file with a semicolon in the nameŠ)

As a consequence, Mac OS internally stores filenames with semicolons (and this
is what you see when you list a directory in the Terminal), but displays them
as slashes in the Finder in order to be backwards-compatible to Methuselah.

So far, so good, but you can imagine that problems can arise because of this
discrepancy: for all the Unix stuff, functions should return filenames without
slashes, otherwise zillions of lines of code would break. For all the "Mac"
stuff, functions should return filenames without semicolons, or another
zillion of lines of code would break. In general, Apple has been pretty good
at keeping the two separate, but there is one particular function call whose
behaviour changed between 10.5 and 10.6. Apparently, this was unintentional
and Apple treated it as a bug, but it took them until Mac OS 10.7 to revert
the behaviour. In the meantime, I had circumvented the bug, so that the
reversal to the "correct" behaviour caused AP to misbehaveŠ Regards,

Martin

--
HairerSoft
http://www.hairersoft.com/



_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at
http://two.pairlist.net/mailman/listinfo/forum_list


_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message
Martin Hairer
Site Admin


Joined: 08 Nov 2006
Posts: 1612

PostPosted: Wed Sep 28, 2011 12:42 pm    Post subject: Cannot save a file with a slash in the title Reply with quote

Quote:
I believe you mean colon [:], which is illegal in Mac filneames, rather than
semicolon [;], which is (and always has been) legal.

Yes, sorry. English isn't my first language and for some reason I always mix them up…

Martin

--
HairerSoft
http://www.hairersoft.com/




_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Martin Hairer
Site Admin


Joined: 08 Nov 2006
Posts: 1612

PostPosted: Sun Oct 30, 2011 7:12 pm    Post subject: Generating playlists Reply with quote

Quote:
I tried Export Markers but got too much information.

It shouldn't be too hard to get TextWrangler to trim that down.
Regards,

Martin

--
HairerSoft
http://www.hairersoft.com/




_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jasonfist



Joined: 26 Jul 2011
Posts: 11

PostPosted: Thu Mar 08, 2012 8:53 am    Post subject: Reply with quote

Interesting conversation, but for me it all boils down to this:

- OSX allows file names with slashes
- Amadeus Pro accepts file names with slashes, starts the saving process, but only at the end says that the file was unable to be saved.

It's not very logical behaviour.

For the moment, I am having to replace the slash with an underscore when saving (so it will work), then go to the Finder and replace the underscore with a slash in the filename. It's slightly silly.

This behaviour is still present in the latest Amadeau Pro and the latest version of OS X (10.7.3).

Will there ever be a fix? Surely a program should be able to save a file containing characters that are all permitted by the system?
Back to top
View user's profile Send private message
CDJonah_alt



Joined: 15 Mar 2007
Posts: 378

PostPosted: Thu Mar 08, 2012 2:30 pm    Post subject: Cannot save a file with a slash in the title Reply with quote

Actually, no, the file system does not allow file names with slashes. It
encodes file names with slashes to remove/hide the slashes. I suspect
the finder allows slashes for legacy reasons.

Chuck

On 3/8/12 2:53 AM, jasonfist wrote:
Quote:
Interesting conversation, but for me it all boils down to this:

- OSX allows file names with slashes
- Amadeus Pro accepts file names with slashes, starts the saving process, but only at the end says that the file was unable to be saved.

It's not very logical behaviour.

For the moment, I am having to replace the slash with an underscore when saving (so it will work), then go to the Finder and replace the underscore with a slash in the filename. It's slightly silly.

This behaviour is still present in the latest Amadeau Pro and the latest version of OS X (10.7.3).

Will there ever be a fix? Surely a program should be able to save a file containing characters that are all permitted by the system?




_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message
jasonfist



Joined: 26 Jul 2011
Posts: 11

PostPosted: Thu Mar 08, 2012 2:38 pm    Post subject: Re: Cannot save a file with a slash in the title Reply with quote

Quote:
Actually, no, the file system does not allow file names with slashes. It encodes file names with slashes to remove/hide the slashes. I suspect the finder allows slashes for legacy reasons.

Chuck


Apart from you being rather pedantic, what the back end does in this case, and for what reason, is pretty much irrelevant.

As things stand, if I can name a file in the Finder using a slash in the title (which I can), I should be able to save a file with a slash in the title from Amadeus (which I can't).


Last edited by jasonfist on Thu Mar 08, 2012 2:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
CDJonah_alt



Joined: 15 Mar 2007
Posts: 378

PostPosted: Thu Mar 08, 2012 2:49 pm    Post subject: Cannot save a file with a slash in the title Reply with quote

Actually not -- almost certainly Apple provides the API that is used to
save file so they don't want you to put slashes in file names. If you
want to do it, remember they may stop supporting it in future versions
and you will be subject to any bugs that show up in the translation process.

Chuck

On 3/8/12 8:38 AM, jasonfist wrote:
Quote:
[quote="CDJonah_alt"]Actually, no, the file system does not allow file names with slashes. It encodes file names with slashes to remove/hide the slashes. I suspect the finder allows slashes for legacy reasons.

Chuck
Quote:


Apart from you being rather pedantic, what the back end does in this case, and for what reason, is pretty much irrelevant.

As things stand, if I can name a file in the Finder using a slash in the title (which I can), I should be able to save a file with a slash in the title from Amadeus (which I can't).




_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message
jasonfist



Joined: 26 Jul 2011
Posts: 11

PostPosted: Thu Mar 08, 2012 3:04 pm    Post subject: Re: Cannot save a file with a slash in the title Reply with quote

Quote:
Actually not -- almost certainly Apple provides the API that is used to save file so they don't want you to put slashes in file names. If you want to do it, remember they may stop supporting it in future versions and you will be subject to any bugs that show up in the translation process.

Chuck


Quite possibly, and Martin has always found successful workarounds in the past. It would be great if he could this time too.

For info, TextEdit (from Apple) allows you to save no problem using file names containing a slash, so maybe it isn't just an API problem.

And as I said, when Amadeus starts saving, it only informs you at the end of the process that something's up. It's just frustrating when I forget about the problem.
Back to top
View user's profile Send private message
Martin Hairer
Site Admin


Joined: 08 Nov 2006
Posts: 1612

PostPosted: Fri Mar 09, 2012 9:18 am    Post subject: Cannot save a file with a slash in the title Reply with quote

Quote:
This behaviour is still present in the latest Amadeau Pro and the latest version of OS X (10.7.3).

I just tried it and it works fine for me. Could I have precise step by step instructions on how to reproduce this reliably with the latest versions of Amadeus Pro and OS X?

Quote:
Will there ever be a fix?

As mentioned earlier, Apple has a history of breaking this behaviour between OS releases so any "fix" only works as long as they don't break it yet again by switching behaviour. I have unfortunately no crystal ball allowing me to predict when Apple will decide to break the behaviour of a poorly documented API. Regards,

Martin

--
HairerSoft
http://www.hairersoft.com/



_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.hairersoft.com Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group