Ticket #11087: filezilla_windows_portable.patch

File filezilla_windows_portable.patch, 802 bytes (added by Tommy Wu, 8 years ago)

windows portable patch

  • src/interface/Options.cpp

    Binary files filezilla.orig/src/interface/.verifycertdialog.cpp.swp and filezilla/src/interface/.verifycertdialog.cpp.swp differ
    diff -Nur filezilla.orig/src/interface/Options.cpp filezilla/src/interface/Options.cpp
    old new  
    842842#ifdef FZ_WINDOWS
    843843    wchar_t buffer[MAX_PATH * 2 + 1];
    844844
     845    DWORD c = GetModuleFileName(0, buffer, MAX_PATH * 2);
     846    if (c && c < MAX_PATH * 2) {
     847        std::wstring tmp;
     848        ret.SetPath(buffer, &tmp);
     849        ret.AddSegment(L"config");
     850        if (ret.Exists()) {
     851            return ret;
     852        }
     853    }
    845854    if (SUCCEEDED(SHGetFolderPath(0, CSIDL_APPDATA, 0, SHGFP_TYPE_CURRENT, buffer))) {
    846855        CLocalPath tmp(buffer);
    847856        if (!tmp.empty()) {