Comments (2)
thanks.. you helped me find where they were going. I have shortened my path to accommodate the problem.
from epg.
I believe this is an issue with how Storage is being used in guide.ts.
In the constructor, Storage is called with no arguments:
Lines 21 to 28 in a1ca6b3
Looking at the code for @freearhey/core (src/storage.ts), if a root directory path is passed it is used, otherwise it uses the current working directory:
constructor(rootDir?: string) {
this._rootDir = rootDir ? path.resolve(rootDir) : process.cwd()
}
When the save call is made:
Lines 45 to 55 in a1ca6b3
it gets mapped to _write in Storage which adds the path to the root directory:
async _write(filepath: string, data: any = ''): Promise<void> {
const absFilepath = path.join(this._rootDir, filepath)
const dir = path.dirname(absFilepath)
await this.createDir(dir)
await fs.writeFile(absFilepath, data, { encoding: 'utf8', flag: 'w' })
}
which is the working directory the script was called from.
I believe the fix would be to utilize Path in @freearhey/core to get the dirname of the output option and pass that to the Storage constructor. From what I can tell if it is just a filename/pattern or references a relative path it should default to the current working directory as a base, so in theory it should be mostly backwards compatible.
Edit: as a workaround you might be able to use ../../download/xml/id.xml
for the output option.
Edit 2: I confirmed ../../download/xml/id.xml
works to put the file into that other directory. I still think absolute paths should be allowable and handled like I mentioned above.
from epg.
Related Issues (20)
- cosmote.gr is broken HOT 1
- Sbs 9 changes name to Viaplay HOT 1
- content.astro.com.my is producing error 429 HOT 1
- RangeError: Invalid string length
- Please add skylife.co.kr as a source
- sky.com epg channel list refresh error HOT 1
- tvtv.us fails with status code 403
- Bug: Parameters issues
- programetv.ro is not working anymore and its the only one for Romania HOT 2
- tvtv.us Internet/Other channels missing HOT 1
- osn
- ontvtonight.com - update channels:us broken
- Request failed with status code 429 HOT 1
- ERR: Unexpected token ; in JSON at position 6950 HOT 2
- Astro Guide broken
- mncvision.id is not working
- starhubplus.com errors due to website change
- Please add viaplay tv sport
- magentatv.de Broken
- Pickx.be is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epg.