Re: [Banshee-List] banshee playlist export * in name becomes _



You can use it in a file name on Linux, if you escape the character at
the command-line (e.g. "example\*file"), but it is generally advisable
not to use characters with special meaning, and so they're often
sanitised for safety.

For example, if you let someone create a file called "D*" and then they
latter tried "rm -rf D*" intending to delete just the file then it'd
also potentially delete their Documents and Downloads folder.

Yes, that'd be a bit of a silly command to run, but it is better to be
safe and not help a user shoot themselves in the foot!

Also, asterisk appears to be prohibited on FAT file systems:
https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations (old,
but potentially another reason for cleansing them).



On 04/02/15 20:39, F.J.H. Dols wrote:
Thanks for your explanation, and time.

* may stand for other characters when used as a wild card, but does that
necessarily exclude * from being part of file names? I do use * as part
of file names every now and then.

Well, Banshee is a great thing and I am happily living with small
details like this one!






On 02/04/2015 07:50 PM, IBBoard wrote:
"*" is a special character in file names - it is a wild card. Sanitising
names so that they don't cause issues normally results in the underscore
character being used. That change is "destructive" (there's no way to
know whether the character was originally an underscore or one of a
dozen other forbidden characters), so when the playlist is re-imported
then there's no way of knowing what to turn it back to.

Looking at the source code, any playlist that doesn't define a title
gets the file name without the extension as its title*. If the playlist
format you chose is purely a list of tracks with no metadata about the
playlist (so it doesn't define a title) then you'll get the behaviour
that you saw.




* var title = playlist.Title ?? Path.GetFileNameWithoutExtension
(uri.LocalPath);



On 03/02/15 21:11, F.J.H. Dols wrote:
Hi,

upon export a * in the name of the playlist becomes _.
When importing this stays a _.

is there a reason for this or is it a small bug?
_______________________________________________
banshee-list mailing list
banshee-list gnome org
https://mail.gnome.org/mailman/listinfo/banshee-list  (unsubscribe here)
_______________________________________________
banshee-list mailing list
banshee-list gnome org
https://mail.gnome.org/mailman/listinfo/banshee-list  (unsubscribe here)

_______________________________________________
banshee-list mailing list
banshee-list gnome org
https://mail.gnome.org/mailman/listinfo/banshee-list  (unsubscribe here)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]