Page MenuHomePhabricator

macOS: make eina_environment_tmp_get() work as elsewhere.
ClosedPublic

Authored by netstar on Oct 2 2018, 4:11 AM.

Details

Summary
On macOS the tmp file path always terminated with an additional
separator, causing issues when making file name comparisons.
For example, the Eio test suits would hang due to this.
This patch trims any trailing path. When joining paths
with eina_environment_tmp_get, macOS should behave
similarly as on other architectures.
Test Plan

Using meson, build EFL and run ninja -C build test suite

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
netstar created this revision.Oct 2 2018, 4:11 AM
netstar requested review of this revision.Oct 2 2018, 4:11 AM

Uuuuhm, how can strlen return a same value of the string does not terminate with /0? O.o

netstar updated this revision to Diff 16996.Oct 2 2018, 4:22 AM

Dont modify that!

Just to show from the console TMPDIR:

TMPDIR=/var/folders/9f/kt6s8nc94y7gt29jz34fsf7w0000gp/T/

Note trailing character, which is causing some issues sometimes.

netstar updated this revision to Diff 16997.Oct 2 2018, 4:24 AM

Final. Apologies.

bu5hm4n accepted this revision.Oct 2 2018, 4:33 AM

Okay, now i understand what you are doing :)

We should probebly document this behaviour somewhere.

This revision is now accepted and ready to land.Oct 2 2018, 4:33 AM

I will check it once i am back at home on the mac and then merge it :)

Closed by commit rEFL1566861acefb: macOS: make eina_environment_tmp_get() work as elsewhere. (authored by netstar, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyOct 2 2018, 7:16 AM
This revision was automatically updated to reflect the committed changes.