Git Product home page Git Product logo

Comments (10)

mmp avatar mmp commented on May 4, 2024

I think that change should fix it; let me know.

Thanks!

from skicka.

bdklahn avatar bdklahn commented on May 4, 2024

commit af59d86
. . . does seem to have fixed the issue.

Before I ran skicka, I took a look at the diff and saw that you copy the file from the sys temp dir to a local temp file, if the rename from the sys temp dir doesn't work. I had thought about something like this, but . . .

  1. Just as the create/write of the temporary file can go wrong, there's a small chance that the write from a copy might too (I guess that's why you copy to the local temp file first).
  2. It's probably good practice to then clean up any temp files created in the sys temp dir.

So I thought that defaulting to creating the temp file in the home dir, in the first place, might be the simplest/safest. Also you find out sooner, rather than later, whether the cache file will be writable to the location you want to access it from (useful), before going through the trouble of creating it.

But, anyway, this works. And I see you've been busy on probably more impactful commits. :-)
I guess, if this mattered that much to me, it would almost be as much work for a modify and pull request, than a comment, here. :-)

Thanks!
Best

from skicka.

andapop avatar andapop commented on May 4, 2024

@bdklahn I was having the exact same problem. So glad you opened the issue!
This fix came just in time :D
Thank you so much!!!

from skicka.

david50407 avatar david50407 commented on May 4, 2024

I got a similar problem on Windows,

skicka: error creating Google Drive client: rename C:\Users\Davy\.skicka.metadata447444166  C:\Users\Davy/.skicka.metadata.cache: Cannot create a file when that file already exists.

And I'm using the version after this patch.

Does anyone have idea?

from skicka.

david50407 avatar david50407 commented on May 4, 2024

And I find the same issue when using os.Rename on Windows here: tv42/go-datastore@4e96acd

I'll create a new issue here.

from skicka.

mmp avatar mmp commented on May 4, 2024

It looks like Windows doesn't like renaming a file on top of an existing one. I added a case to remove the target file in that case; please let me know if this fixes it.

from skicka.

david50407 avatar david50407 commented on May 4, 2024

I got File in use error when remove the target file on Windows.

BTW, my /tmp is full with creating too many skicka.metadataXXXXXX files on my Linux.
I think that commit af59d86 do not remove the metadata temporary file in /tmp when we use the 'Plan B'.

from skicka.

bgrainger avatar bgrainger commented on May 4, 2024

@david50407 That error sounds very much like issue #75 that I just opened. (I have a local fix for that but haven't pushed it yet.)

from skicka.

david50407 avatar david50407 commented on May 4, 2024

@bgrainger Yes, I think that's the same one.

from skicka.

mmp avatar mmp commented on May 4, 2024

Closing this as I believe that it should also be fixed by 93fb2d9.

from skicka.

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.