Skip to content

Error: EXDEV: cross-device link not permitted #32

@mordax7

Description

@mordax7

Description:
The tempy library uses rename to move the files under Linux. In this https://github.com/feramhq/transity/blob/master/scripts/transactions/hypovereinsbank.js#L156 case it moves the downloaded csv from the ~/Download/... directory to the temporary directory. This caused an error because of:

EXDEV oldpath and newpath are not on the same mounted filesystem. (Linux permits a filesystem to be mounted at multiple points, but rename() does not work across different mount points, even if the same filesystem is mounted on both.)

For more, see man rename manpage:

Log:

Open https://my.hypovereinsbank.de/login?view=/de/login.jsp
Log in
Go to transactions page
Enter range 2020-06-24 to 2020-09-12
Download CSV file to /tmp/28ccc30ea3fa35728eac46a9c4dd7e62/hypovereinsbank-transactions.csv
Nightmare runner error:

	Error: EXDEV: cross-device link not permitted, rename '/home/DEDUCTED/Downloads/15620204_Umsatzliste.csv' -> '/tmp/28ccc30ea3fa35728eac46a9c4dd7e62/hypovereinsbank-transactions.csv'
	   at Object.fs.renameSync (fs.js:772:18)
	   at DownloadItem.eval (eval at <anonymous> (/home/DEDUCTED/.work/github/public/transity/node_modules/nightmare/lib/runner.js:543:14), <anonymous>:43:22)
	   at emitTwo (events.js:125:13)
	   at DownloadItem.emit (events.js:213:7)

Workaround:
I changed the filePathTemp to a path which was on the same partition as from where I ran the script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions