file_basename(): bug or feature? [message #42773] |
Thu, 24 February 2005 13:06 |
Benjamin Hornberger
Messages: 258 Registered: March 2004
|
Senior Member |
|
|
On Unix machines, IDL's file_basename() function doesn't split a path in
Windows format (with backslashes). On Windows machines, it splits both
(yes, I know, on Windows you can also use both to specify a path). Is
this a bug or a feature?
Linux:
IDL> filename='d:\path\to\file.ex
IDL> print,file_basename(filename)
d:\path\to\file.ex
IDL> filename='d:/path/to/file.ex'
IDL> print,file_basename(filename)
file.ex
Windows:
IDL> filename='d:\path\to\file.ex'
IDL> print,file_basename(filename)
file.ex
IDL> filename='d:/path/to/file.ex'
IDL> print,file_basename(filename)
file.ex
I have a situation where a Linux machine has to handle Windows paths,
where this is quite annoying ...
Any comments? Thanks
Benjamin
|
|
|