Commit 37d297ac authored by Joachim Eibl's avatar Joachim Eibl
Browse files

CYGWIN workaround also for non-existing files

git-svn-id: https://kdiff3.svn.sourceforge.net/svnroot/kdiff3/trunk@176 c8aa9fed-2811-0410-8543-893ada326672
parent 48f604dd
...@@ -304,13 +304,13 @@ void FileAccess::setFile( const QString& name, bool bWantToWrite ) ...@@ -304,13 +304,13 @@ void FileAccess::setFile( const QString& name, bool bWantToWrite )
QString localName = name; QString localName = name;
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
if ( !bExistsLocal ) if ( localName.startsWith("/tmp/") )
{ {
// git on Cygwin will put files in /tmp // git on Cygwin will put files in /tmp
// A workaround for the a native kdiff3 binary to find them... // A workaround for the a native kdiff3 binary to find them...
QString cygwinBin = getenv("CYGWIN_BIN"); QString cygwinBin = getenv("CYGWIN_BIN");
if (localName.startsWith("/tmp/") && !cygwinBin.isEmpty() ) if ( !cygwinBin.isEmpty() )
{ {
localName = QString("%1\\..%2").arg(cygwinBin).arg(name); localName = QString("%1\\..%2").arg(cygwinBin).arg(name);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment