Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle reserved characters in filepaths #1629

Open
wants to merge 4 commits into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -26,6 +26,7 @@ const uniq = require('uniq')
const utMetadata = require('ut_metadata')
const utPex = require('ut_pex') // browser exclude
const parseRange = require('parse-numeric-range')
const safeFilename = require('safe-filename')

const File = require('./file')
const Peer = require('./peer')
@@ -447,6 +448,7 @@ class Torrent extends EventEmitter {
}

this._rarityMap = new RarityMap(this)
this.files.forEach(file => file.path = safeFilename.path(file.path))

this.store = new ImmediateChunkStore(
new this._store(this.pieceLength, {
@@ -52,6 +52,7 @@
"run-parallel": "^1.1.6",
"run-parallel-limit": "^1.0.3",
"safe-buffer": "^5.0.1",
"safe-filename": "^1.0.1",
"simple-concat": "^1.0.0",
"simple-get": "^3.0.1",
"simple-peer": "^9.0.0",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.