MCPcopy
hub / github.com/remotely-save/remotely-save / ensureMTimeOfRemoteEntityValid

Function ensureMTimeOfRemoteEntityValid

pro/src/sync.ts:106–123  ·  view source on GitHub ↗
(remote: Entity)

Source from the content-addressed store, hash-verified

104 * @param remote
105 */
106const ensureMTimeOfRemoteEntityValid = (remote: Entity) => {
107 if (
108 !remote.key!.endsWith("/") &&
109 remote.mtimeCli === undefined &&
110 remote.mtimeSvr === undefined
111 ) {
112 if (remote.key === remote.keyEnc) {
113 throw Error(
114 `Your remote file ${remote.key} has last modified time 0, don't know how to deal with it.`
115 );
116 } else {
117 throw Error(
118 `Your remote file ${remote.key} (encrypted as ${remote.keyEnc}) has last modified time 0, don't know how to deal with it.`
119 );
120 }
121 }
122 return remote;
123};
124
125const isInsideObsFolder = (x: string, configDir: string) => {
126 if (!configDir.startsWith(".")) {

Callers 1

ensembleMixedEntiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected