github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

symfony / symfony

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
    • 1,062
    • 191
  • Source
  • Commits
  • Network
  • Pull Requests (3)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Graph
  • Members

schmittjoh wants someone to pull 1 commit into symfony:master from schmittjoh:master

  • Discussion
  • Commits 1
  • Files Changed 1
  • Reply

Showing 3 comments with 1 commit and 0 commit comments

#10 Closed

"Permission denied" bug on Windows

schmittjoh — Wed Sep 15 04:19:59 -0700 2010

I've tried to set-up symfony 2 on Windows 7.

When running the phpunit test suite, I encountered a strange "Permission denied" error although I was running the script with administrator priviledges.

After debugging for a while, it seems like the test is run multiple times within the same CLI instance. The first time it is run, the test folder is created without problems. The second time, it already exists and it is consequentially being removed via rmdir(), and then re-created with mkdir(). The latter results in the "Permission denied" error.

The suggested fix appends an incrementing number to the base test folder, so that the above case never exists. Alternatively, you could avoid calls to rmdir()/mkdir() if the folder already exists.

schmittjoh added some commits

Wed Sep 15 04:10:39 -0700 2010

4347f9f fixes a 'permission denied' bug on Windows

fabpot commented

Thu Sep 23 00:07:01 -0700 2010

Can you create a ticket for that problem? Your fix cannot be merge as it does not fixes the problem but is just a workaround.

schmittjoh commented

Thu Sep 23 00:31:29 -0700 2010

Done: http://trac.symfony-project.org/ticket/9091

Any idea what the actual problem is?

fabpot commented

Thu Sep 23 07:22:44 -0700 2010

I don't have windows on my machine, so I have no idea.

Comment on this pull request

You must be logged in to comment on pull requests.

Active Participants

  • schmittjoh
  • fabpot

Showing 1 unique commit by 1 author.

4347f9f5 schmittjoh fixes a 'permission denied' bug on Windows Wed Sep 15 04:10:39 -0700 2010

Showing 1 changed files with 5 additions and 4 deletions.

M tests/Symfony/Tests/Component/Finder/Iterator/RealIteratorTestCase.php 9 ••••
Txt tests/Symfony/Tests/Component/Finder/Iterator/RealIteratorTestCase.php
  • View file @ 4347f9f
... ...
@@ -16,10 +16,11 @@ require_once __DIR__.'/IteratorTestCase.php';
16 16
 class RealIteratorTestCase extends IteratorTestCase
17 17
 {
18 18
     static protected $files;
19  
-
  19
+    static protected $callCount = 0;
  20
+    
20 21
     static public function setUpBeforeClass()
21 22
     {
22  
-        $tmpDir = sys_get_temp_dir().'/symfony2_finder';
  23
+        $tmpDir = sys_get_temp_dir().'/symfony2_finder'.(self::$callCount++);
23 24
         self::$files = array(
24 25
             $tmpDir.'/.git/',
25 26
             $tmpDir.'/test.py',
... ...
@@ -46,8 +47,8 @@ class RealIteratorTestCase extends IteratorTestCase
46 47
         file_put_contents($tmpDir.'/test.php', str_repeat(' ', 800));
47 48
         file_put_contents($tmpDir.'/test.py', str_repeat(' ', 2000));
48 49
 
49  
-        touch(sys_get_temp_dir().'/symfony2_finder/foo/bar.tmp', strtotime('2005-10-15'));
50  
-        touch(sys_get_temp_dir().'/symfony2_finder/test.php', strtotime('2005-10-15'));
  50
+        touch($tmpDir.'/foo/bar.tmp', strtotime('2005-10-15'));
  51
+        touch($tmpDir.'/test.php', strtotime('2005-10-15'));
51 52
     }
52 53
 
53 54
     static public function tearDownAfterClass()
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • Русский
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Русский
  • Српски
  • Svenska
  • 中文

Keyboard Shortcuts

Site wide shortcuts

s
Focus site search
?
Bring up this help dialog

Commit list

j
Move selected down
k
Move selected up
t
Open tree
p
Open parent
c or o or enter
Open commit

Pull request list

j
Move selected down
k
Move selected up
o or enter
Open issue

Issues

j
Move selected down
k
Move selected up
x
Toggle select target
o or enter
Open issue
I
Mark selected as read
U
Mark selected as unread
e
Close selected
y
Remove selected from view
c
Create issue
l
Create label
i
Back to inbox
u
Back to issues
/
Focus issues search

Network Graph

← or h
Scroll left
→ or l
Scroll right
↑ or k
Scroll up
↓ or j
Scroll down
t
Toggle visibility of head labels
shift ← or shift h
Scroll all the way left
shift → or shift l
Scroll all the way right
shift ↑ or shift k
Scroll all the way up
shift ↓ or shift j
Scroll all the way down