Ticket #1282 (assigned todo)

Opened 5 years ago

Last modified 3 years ago

OS.cwd returns platform specific slashes...

Reported by: coke Owned by: Yuki`N
Priority: normal Milestone:
Component: core Version: trunk
Severity: low Keywords: newbie
Cc: Language:
Patch status: new Platform: all

Description

... but some languages need a way to get agnostic slashes. Rather than have every HLL implement this, there should be some way to canonicalize the path, and a way to get the platform-specific path. (This will allow hlls to pick whichever method they prefer.)

I don't particularly care about the implementation, as long as I can make

C:\Tcl\bin>tclsh
% puts [pwd]
C:/Tcl/bin

work.

This issue originally opened as  http://rt.perl.org/rt3/Ticket/Display.html?id=39853

Change History

Changed 4 years ago by whiteknight

  • owner set to whiteknight

Changed 4 years ago by whiteknight

  • lang set to tcl
  • severity changed from medium to low
  • component changed from none to core
  • platform set to all
  • keywords tcl added
  • type changed from RFC to todo

Changed 3 years ago by cotto

  • keywords newbie added

There are a few minor pitfalls, but I think this would be a good newbie ticket. Iterating over the characters should be a safe way to do this.

Changed 3 years ago by Yuki`N

  • status changed from new to assigned
  • owner changed from whiteknight to Yuki`N

Changed 3 years ago by Yuki`N

  • keywords tcl removed
  • lang tcl deleted
  • patch set to new

Added Parrot_lib_fix_path_slashes in a9642d402b, OS.cwd now uses this function.

Awaiting status of  Github pull request.

Note: See TracTickets for help on using tickets.