Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2013-09-06 20:27:41 +0400
committerMike Krüger <mkrueger@xamarin.com>2013-09-11 20:44:18 +0400
commitd32ee5264a10b2ca832c556a1b0ec656450f3d1c (patch)
tree4756c0fd30b7adce18565f762e75672a041894d3 /main
parentb9eabe881b7c12596adf86d0c7df470e5cea6399 (diff)
Fixed 'Bug 14480 - Files are not saving'.
Diffstat (limited to 'main')
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Utils/TextFileUtility.cs11
1 files changed, 2 insertions, 9 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Utils/TextFileUtility.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Utils/TextFileUtility.cs
index 7bf50cbe40..aa1dad75cd 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Utils/TextFileUtility.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Utils/TextFileUtility.cs
@@ -201,15 +201,8 @@ namespace Mono.TextEditor.Utils
throw new ArgumentNullException ("text");
if (encoding == null)
throw new ArgumentNullException ("encoding");
- string tmpPath;
-
- if (Platform.IsMac || Platform.IsWindows) {
- tmpPath = Path.GetTempFileName ();
- } else {
- // atomic rename only works in the same directory on linux.
- tmpPath = Path.Combine (Path.GetDirectoryName (fileName), ".#" + Path.GetFileName (fileName));
- }
-
+ // atomic rename only works in the same directory on linux. The tmp files may be on another partition -> breaks save.
+ string tmpPath = Path.Combine (Path.GetDirectoryName (fileName), ".#" + Path.GetFileName (fileName));
using (var stream = new FileStream (tmpPath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write)) {
if (hadBom) {
var bom = encoding.GetPreamble ();