Changeset f390831 for core


Ignore:
Timestamp:
Apr 1, 2017 2:15:06 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
bfc0417
Parents:
5eefb8b2
Message:

Console: Fix stopping of webapps when console stops (ticket #1893)
i2psnark: Only rewrite torrent config file if changed (ticket #1893)
Util: Don't sync config writes on Android/ARM (ticket #1893)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/DataHelper.java

    r5eefb8b2 rf390831  
    4747import net.i2p.util.ReusableGZIPOutputStream;
    4848import net.i2p.util.SecureFileOutputStream;
     49import net.i2p.util.SystemVersion;
    4950import net.i2p.util.Translate;
    5051
     
    5556 */
    5657public class DataHelper {
     58
     59    /** See storeProps(). 600-750 ms on RPi. */
     60    private static final boolean SHOULD_SYNC = !(SystemVersion.isAndroid() || SystemVersion.isARM());
    5761
    5862    /**
     
    515519                out.println(name + "=" + val);
    516520            }
    517             out.flush();
    518             fos.getFD().sync();
     521            if (SHOULD_SYNC) {
     522                out.flush();
     523                fos.getFD().sync();
     524            }
    519525            out.close();
    520526            if (out.checkError()) {
Note: See TracChangeset for help on using the changeset viewer.