瀏覽代碼

Supporting long paths when saving or loading the extension or script file

Source commit: 87e4e61adec5e6e57517bf4ffe731710ba5aca37
Martin Prikryl 9 年之前
父節點
當前提交
4d2319daf3
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      source/core/Common.cpp
  2. 1 1
      source/forms/Preferences.cpp

+ 1 - 1
source/core/Common.cpp

@@ -3428,5 +3428,5 @@ UnicodeString __fastcall AssemblyNewClassInstanceEnd(TAssemblyLanguage Language,
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 void __fastcall LoadScriptFromFile(UnicodeString FileName, TStrings * Lines)
 void __fastcall LoadScriptFromFile(UnicodeString FileName, TStrings * Lines)
 {
 {
-  Lines->LoadFromFile(FileName, TEncoding::UTF8);
+  Lines->LoadFromFile(ApiPath(FileName), TEncoding::UTF8);
 }
 }

+ 1 - 1
source/forms/Preferences.cpp

@@ -2534,7 +2534,7 @@ void __fastcall TPreferencesDialog::AddExtension()
         {
         {
           Abort();
           Abort();
         }
         }
-        Lines->SaveToFile(ExtensionPath);
+        Lines->SaveToFile(ApiPath(ExtensionPath));
         FAddedExtensions->Add(ExtensionPath);
         FAddedExtensions->Add(ExtensionPath);
       }
       }