Remove remaing from 'os' imports
Summary: Per title. Reviewed By: passy Differential Revision: D32721206 fbshipit-source-id: 9e465d0ed60c0c6da33c462aa76468faac620626
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2480ed30c5
commit
2b4981c7cb
@@ -11,7 +11,7 @@ import React, {Component} from 'react';
|
||||
import BaseDevice from '../devices/BaseDevice';
|
||||
import {Button, Glyph, colors} from '../ui';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
import {getRenderHostInstance} from '../RenderHost';
|
||||
|
||||
type OwnProps = {
|
||||
recordingFinished: (path: string | null) => void;
|
||||
@@ -41,7 +41,10 @@ export default class VideoRecordingButton extends Component<Props, State> {
|
||||
return;
|
||||
}
|
||||
|
||||
const flipperDirectory = path.join(os.homedir(), '.flipper');
|
||||
const flipperDirectory = path.join(
|
||||
getRenderHostInstance().serverConfig.paths.homePath,
|
||||
'.flipper',
|
||||
);
|
||||
const fileName = `screencap-${new Date()
|
||||
.toISOString()
|
||||
.replace(/:/g, '')}.mp4`;
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import os from 'os';
|
||||
import {VersionCheckResult} from '../chrome/UpdateIndicator';
|
||||
import {getRenderHostInstance} from '../RenderHost';
|
||||
|
||||
const updateServer = 'https://www.facebook.com/fbflipper/public/latest.json';
|
||||
|
||||
const getPlatformSpecifier = (): string => {
|
||||
switch (os.platform()) {
|
||||
switch (getRenderHostInstance().serverConfig.environmentInfo.os.platform) {
|
||||
case 'win32':
|
||||
return 'windows';
|
||||
case 'linux':
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
import * as React from 'react';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import {getLogger} from 'flipper-common';
|
||||
import {Store, MiddlewareAPI} from '../reducers';
|
||||
@@ -623,7 +622,10 @@ export function canFileExport() {
|
||||
export async function startFileExport(dispatch: Store['dispatch']) {
|
||||
const file = await getRenderHostInstance().showSaveDialog?.({
|
||||
title: 'FlipperExport',
|
||||
defaultPath: path.join(os.homedir(), 'FlipperExport.flipper'),
|
||||
defaultPath: path.join(
|
||||
getRenderHostInstance().serverConfig.paths.homePath,
|
||||
'FlipperExport.flipper',
|
||||
),
|
||||
});
|
||||
if (!file) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user