Menu

#2903 creat temp folder if ereased

open
nobody
None
5
2012-12-21
2009-12-11
Matthias
No

As noted and discussed in forum
https://sourceforge.net/apps/phpbb/winmerge/viewtopic.php?f=4&t=156

this patch will recreate the tempfolder if needed.
While opening and refresh(rescan) as in this case 'env_GetTempFileName' is not called.

Discussion

  • Matthias

    Matthias - 2009-12-11

    recreate needed tempfolder

     
  • Kimmo Varis

    Kimmo Varis - 2009-12-21

    This is really not a fix, but band-aid for the problem. If another program deletes temp files while WinMerge is running we have lost already. So the correct fix is like mentioned in the forum to lock those temp file folders/files for WinMerge.

    And even this patch I understan re-creating folder before rescan. But why in env_GetTempFileName()?

    File system accesses aren't something you can just throw into the code - every file system access slows down WinMerge and we've been trying to remove unnecessary accesses earlier.

     
  • Matthias

    Matthias - 2009-12-22

    I was thinking about that, so we only create a tempfile in case we use a plugin...
    Ok I will see for a seperate poosition where i can recreate once.

     
  • Kimmo Varis

    Kimmo Varis - 2009-12-22

    I don't care a bit about plugins (feature we are removing). Normal compare uses temp files too.

     
  • Matthias

    Matthias - 2009-12-22

    easy recreate tempfoder

     
  • Matthias

    Matthias - 2009-12-22

    so this is an easier kind of recreate. Hope the extern progs are not more doing a delete while scanning, otherwise i think we must keep a filehandle active while Winmerge is running.

     
  • Kimmo Varis

    Kimmo Varis - 2009-12-22

    Wrong approach. Like I already said if other program deletes WinMerge temp file its already game over. Just creating them again doesn't help.

    So we need to *lock* temp files. And yes, it is bigger change. But better do it right than add pile of hacks that work only in some circumstances.

     
  • Matthias

    Matthias - 2009-12-22

    create folder if needed

     
  • Matthias

    Matthias - 2009-12-22

    I add a extention to env_GetTempFileName()
    in case of an error WM will create the folder a repeat once.

     
  • Kimmo Varis

    Kimmo Varis - 2009-12-23

    And how does that help the basic problem?

     

Log in to post a comment.