Giter Club home page Giter Club logo

Comments (6)

turtletowerz avatar turtletowerz commented on July 17, 2024 1

I could change the Rename function to move files a bit more properly, similar to the answer here, but I don't believe the issue is related to the temporary directory, as this is more related to how unix systems rename files.

I'll make a PR sometime today, but I don't have any unix-based OS to test a new change on so if the PR gets approved I would like some feedback as to whether it worked or not.

from anirip.

turtletowerz avatar turtletowerz commented on July 17, 2024

There are a few cases where manipulating files across partitions causes problems in Golang (example). I'm not sure there is an easy fix for this outside of checking for that specific error and creating the TMPDIR in the current working directory. I could make a PR for this but it's a very specific case that I doubt most people will have to deal with.

from anirip.

ckolivas avatar ckolivas commented on July 17, 2024

It's not that uncommon in linux to mount the home directory on a separate partition to the root directory. Is there any reason the anirip temporary directory can't simply be placed in the output directory?

from anirip.

jhgorse avatar jhgorse commented on July 17, 2024

Can confirm this occurs in macOS as well. Temporary directory should be in PWD or app resilient enough to move (copy/delete) between mounted partitions.

Error reported is:

[anirip] Downloading video... [anirip] Downloading subtitles...en-US [anirip] Merging subtitles into MKV container... [anirip] Error: rename /var/folders/wv/h3m89k8959z6sx012m8v6ljc0000gn/T//anirip/episode.mkv $$$$/Season One/$$$$ - S01E111 - %%%%.mkv: cross-device link [anirip] Downloading and merging completed successfully! [anirip] Retrieving Episode Info...

from anirip.

jhgorse avatar jhgorse commented on July 17, 2024

Well, it also appears that this is also the architecture used by FreeNAS and Jails: a mount point back to the storage volume. So this will not work there, either.

@turtletowerz are you still game for that PR?

from anirip.

jhgorse avatar jhgorse commented on July 17, 2024

// TempDir returns the default directory to use for temporary files. // // On Unix systems, it returns $TMPDIR if non-empty, else /tmp. // On Windows, it uses GetTempPath, returning the first non-empty // value from %TMP%, %TEMP%, %USERPROFILE%, or the Windows directory. // On Plan 9, it returns /tmp. // // The directory is neither guaranteed to exist nor have accessible // permissions. func TempDir() string { return tempDir() }

So maybe I just define $TMPDIR. Testing.

cd path/to/dir mkdir .tmp/anirip export TMPDIR=.tmp anirip username password http://www.crunchyroll.com/miss-kobayashis-dragon-maid

This appears to resolve the issue for macOS.

from anirip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.