Absolute child is error prone
See original GitHub issue“append” an absolute child is error prone, and not consistent with Bash
.
import better.files._
import better.files.File.home
val bashrc = home / ".bashrc"
// --> /home/user/.bashrc
val bashrcBak = file"/tmp/aBackupDir" / (bashrc.pathAsString + ".bak")
// --> /home/user/.bashrc.bak
// Not /tmp/aBackupDir//home/user/.bashrc.bak
// Not /tmp/aBackupDir/home/user/.bashrc.bak
With Bash
: /tmp/aBackupDir//home/user/.bashrc.bak
$ cat "/tmp/aBackupDir"/"/home/user/.bashrc.bak"
cat: /tmp/aBackupDir//home/user/.bashrc.bak: No such file or directory
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
css - parent's position is absolute and child's ... - Stack Overflow
If the parent is absolute and child relative : they are bound. the child moves ( width and height ) towards or away...
Read more >The Competing Principles of Child Protection - Evident Change
Too often, accounts from the media characterize caseworkers as either biased baby snatchers or error-prone bureaucrats who miss red flags.
Read more >Absolute Percent Errors for the Child Woman Ratio. The ...
We show that even the simplest and least accurate variant has a median error of only 0.09 births per woman over 2,400 fertility...
Read more >How can I contain these children.. absolute and relative ...
I'm trying to get #relative_test2 to contain it's children #test2 and #test3. Overflow:hidden didn't work, evidently that is just for floats.
Read more >Hyperopia - StatPearls - NCBI Bookshelf
For children with refractive error only, proper refractive correction is indicated. If amblyopia development is suspected, orthoptic exercises ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we need to implement a typed path for relative and absolute paths to prevent stuff like this
Aha, so you already did! @jaa127 😉
Cool to see this merged. We have some other issues that you may want to play around with – we’re currently trying to prepare for a release in the Scala Platform, the next community-maintained Scala library that will replace the current standard library in 2.13.