Skip to content

Commit

Permalink
delete comment and update rewind time
Browse files Browse the repository at this point in the history
  • Loading branch information
ArceDanielShok committed Sep 30, 2024
1 parent 9bbd0d7 commit 310b92b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/apps/main/remote-sync/RemoteSyncManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SyncConfig,
rewind,
WAITING_AFTER_SYNCING_DEFAULT,
SIX_HOURS_IN_MILLISECONDS,
FIVETEEN_MINUTES_IN_MILLISECONDS,
} from './helpers';
import { reportError } from '../bug-report/service';

Expand Down Expand Up @@ -251,7 +251,7 @@ export class RemoteSyncManager {

const updatedAt = new Date(result.updatedAt);

return rewind(updatedAt, SIX_HOURS_IN_MILLISECONDS);
return rewind(updatedAt, FIVETEEN_MINUTES_IN_MILLISECONDS);
}

/**
Expand Down Expand Up @@ -406,7 +406,7 @@ export class RemoteSyncManager {

const updatedAt = new Date(result.updatedAt);

return rewind(updatedAt, SIX_HOURS_IN_MILLISECONDS);
return rewind(updatedAt, FIVETEEN_MINUTES_IN_MILLISECONDS);
}

private async syncRemoteFolders(
Expand Down
9 changes: 0 additions & 9 deletions src/apps/utils/isTemporalFile.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';
import Logger from 'electron-log';

// Function to check if the file is marked as temporary by the OS (Windows example)
export const isTemporaryFile = async (filePath: string): Promise<boolean> => {
try {
// Check if the file name starts with a common temporary prefix
Expand All @@ -27,13 +25,6 @@ export const isTemporaryFile = async (filePath: string): Promise<boolean> => {
Logger.debug(`File ${filePath} is in Recycle Bin`);
return true;
}

// Check if the file has the "TEMPORARY" attribute (Windows-specific)
// const stats = await fs.promises.stat(filePath);
// if (stats.isFile()) {
// return stats.mode !== 0;
// }

return false;
} catch (error) {
Logger.error(`Failed to check if the file is temporary: ${error}`);
Expand Down

0 comments on commit 310b92b

Please sign in to comment.