Skip to content

Commit

Permalink
Cleaned the code
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienCastex committed Jun 30, 2017
1 parent e39fd71 commit 1a46154
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/manager/v2/instances/PhysicalFileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var PhysicalSerializer = (function () {
function PhysicalSerializer() {
}
PhysicalSerializer.prototype.uid = function () {
return 'PhysicalFSSerializer_1.0.0';
return 'PhysicalFSSerializer-1.0.0';
};
PhysicalSerializer.prototype.serialize = function (fs, callback) {
callback(null, {
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/v2/instances/VirtualFileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var VirtualSerializer = (function () {
function VirtualSerializer() {
}
VirtualSerializer.prototype.uid = function () {
return 'VirtualFSSerializer_1.0.0';
return 'VirtualFSSerializer-1.0.0';
};
VirtualSerializer.prototype.serialize = function (fs, callback) {
callback(null, fs.resources);
Expand Down
2 changes: 1 addition & 1 deletion lib/server/v2/commands/Lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function createLock(ctx, data, callback) {
var type_1 = new LockType_1.LockType(root.find('DAV:locktype').elements[0].name.substr(4).toLowerCase());
var ownerElement = root.find('DAV:owner');
var owner = ownerElement ? ownerElement.elements : null;
var lock_1 = new Lock_1.Lock(new LockKind_1.LockKind(scope, type_1, ctx.server.options.lockTimeout), ctx.user, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);
var lock_1 = new Lock_1.Lock(new LockKind_1.LockKind(scope, type_1, ctx.server.options.lockTimeout), ctx.user ? ctx.user.uid : undefined, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);
var go_1 = function (r, callback) {
r.listDeepLocks(function (e, locks) {
if (e)
Expand Down
2 changes: 1 addition & 1 deletion src/manager/v2/instances/PhysicalFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class PhysicalSerializer implements FileSystemSerializer
{
uid() : string
{
return 'PhysicalFSSerializer_1.0.0';
return 'PhysicalFSSerializer-1.0.0';
}

serialize(fs : PhysicalFileSystem, callback : ReturnCallback<any>) : void
Expand Down
2 changes: 1 addition & 1 deletion src/manager/v2/instances/VirtualFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class VirtualSerializer implements FileSystemSerializer
{
uid() : string
{
return 'VirtualFSSerializer_1.0.0';
return 'VirtualFSSerializer-1.0.0';
}

serialize(fs : VirtualFileSystem, callback : ReturnCallback<any>) : void
Expand Down
2 changes: 1 addition & 1 deletion src/server/v2/commands/Lock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function createLock(ctx : HTTPRequestContext, data : Buffer, callback)
const ownerElement = root.find('DAV:owner');
const owner = ownerElement ? ownerElement.elements : null;

const lock = new Lock(new LockKind(scope, type, ctx.server.options.lockTimeout), ctx.user, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);
const lock = new Lock(new LockKind(scope, type, ctx.server.options.lockTimeout), ctx.user ? ctx.user.uid : undefined, owner, ctx.headers.depth === undefined ? -1 : ctx.headers.depth);

const go = (r : Resource, callback : SimpleCallback) =>
{
Expand Down
2 changes: 1 addition & 1 deletion src/server/v2/commands/Put.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HTTPCodes, HTTPMethod, HTTPRequestContext } from '../WebDAVRequest'
import { ResourceType, OpenWriteStreamMode } from '../../../manager/v2/fileSystem/CommonTypes'
import { Errors, HTTPError } from '../../../Errors'
import { Errors } from '../../../Errors'
import { Readable } from 'stream'
import * as path from 'path'

Expand Down
2 changes: 1 addition & 1 deletion src/server/v2/webDAVServer/StartStop.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HTTPCodes, HTTPRequestContext, HTTPMethod } from '../WebDAVRequest'
import { WebDAVServerStartCallback } from './WebDAVServer'
import { Writable, Readable } from 'stream'
import { Errors, HTTPError } from '../../../Errors'
import { Errors } from '../../../Errors'
import { WebDAVServer } from './WebDAVServer'
import { autoSave } from './Persistence'
import { IAutoSave } from '../WebDAVServerOptions'
Expand Down

0 comments on commit 1a46154

Please sign in to comment.