Author: rfm
Date: Mon Apr 28 11:00:24 2014
New Revision: 37819

URL: http://svn.gna.org/viewcvs/gnustep?rev=37819&view=rev
Log:
fix corupt commit

Modified:
    libs/ec/trunk/EcProcess.m

Modified: libs/ec/trunk/EcProcess.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcProcess.m?rev=37819&r1=37818&r2=37819&view=diff
==============================================================================
--- libs/ec/trunk/EcProcess.m   (original)
+++ libs/ec/trunk/EcProcess.m   Mon Apr 28 11:00:24 2014
@@ -1332,48 +1332,40 @@
   hdl = [cmdLogMap objectForKey: name];
   if (hdl != nil)
     {
-      /* Ensure that all data is written to file.
+      NSString         *path;
+      NSDictionary     *attr;
+      NSFileManager    *mgr;
+
+      /*
+       * Ensure that all data is written to file.
        */
       fflush(stderr);
-
-      /* If we are writing to stderr, we can't close the file handle
-       * and move the underlying file.
+      [hdl closeFile];
+
+      /*
+       * If the file is empty, remove it, otherwise move to archive directory.
        */
-      if ([NSFileHandle fileHandleWithStandardError] != hdl)
-        {
-          [hdl closeFile];
-        }
+      path = [cmdLogsDir(nil) stringByAppendingPathComponent: name]; 
+      mgr = [NSFileManager defaultManager];
+      attr = [mgr fileAttributesAtPath: path traverseLink: NO];
+      if ([[attr objectForKey: NSFileSize] intValue] == 0)
+       {
+         [mgr removeFileAtPath: path handler: nil];
+       }
       else
-        {
-          NSString      *path;
-          NSDictionary *attr;
-          NSFileManager        *mgr;
-
-
-          /* If the file is empty, remove it,
-           * otherwise move to archive directory.
-           */
-          path = [cmdLogsDir(nil) stringByAppendingPathComponent: name]; 
-          mgr = [NSFileManager defaultManager];
-          attr = [mgr fileAttributesAtPath: path traverseLink: NO];
-          if ([[attr objectForKey: NSFileSize] intValue] == 0)
-            {
-              [mgr removeFileAtPath: path handler: nil];
-            }
-          else
-            {
-              NSDate   *when;
-              NSString *where;
-
-              when = [NSDate date];
-              where = [when descriptionWithCalendarFormat: @"%Y-%m-%d"
-                            timeZone: nil locale: nil];
-              if (where != nil)
-                {
-                  [self _moveLog: name to: where];
-                }
-            }
-        }
+       {
+         NSDate        *when;
+         NSString      *where;
+
+         when = [NSDate date];
+         where = [when descriptionWithCalendarFormat: @"%Y-%m-%d"
+                       timeZone: nil locale: nil];
+         if (where != nil)
+           {
+             [self _moveLog: name to: where];
+           }
+       }
+
       /*
        * Unregister filename.
        */


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to