Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/optim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoray kavukcuoglu <koray@kavukcuoglu.org>2015-07-24 10:14:52 +0300
committerkoray kavukcuoglu <koray@kavukcuoglu.org>2015-07-24 10:14:52 +0300
commit5035f46f7337a3eb1624d29ac6b3f1c717abb5fc (patch)
treec7728ecfd0c3517db25f889e6ff14940f2905684
parent07fb9e0e22c1ff1a64613b24f0ba290e710aa5bd (diff)
parent5407171b0163edc40c696875d58ff5b601656fad (diff)
Merge pull request #60 from samehkhamis/master
Making things work under windows
-rw-r--r--Logger.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/Logger.lua b/Logger.lua
index e4b97e7..814a632 100644
--- a/Logger.lua
+++ b/Logger.lua
@@ -35,7 +35,7 @@ local Logger = torch.class('optim.Logger')
function Logger:__init(filename, timestamp)
if filename then
self.name = filename
- os.execute('mkdir -p "' .. paths.dirname(filename) .. '"')
+ os.execute('mkdir ' .. (sys.uname() ~= 'windows' and '-p ' or '') .. ' "' .. paths.dirname(filename) .. '"')
if timestamp then
-- append timestamp to create unique log file
filename = filename .. '-'..os.date("%Y_%m_%d_%X")